Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all 8332 articles
Browse latest View live

Output type not triggered in delivery for background PGI during shipment start

$
0
0

Hi,

 

  We have a scenario where an output type is not triggered( medium 5 - external send ) in delivery where PGI is done in background when shipment start is selected and shipment is saved.

 

  Here we are using activity profile to trigger PGI in background.

 

  Condition record is maintained and when i check the determination analysis in VL02n it says output found

 

  Please help.

 

Thanks,


MATMAS_MASS_BAPI

$
0
0

Hello SAP Guru's - I am using MATMAS_MASS_BAPI for my conversion.  I am trying to update QMAT table with Inspection setup.  Has anyone used it?  If so which segment?  Please advise

 

Regards

Sudhakar

unlocking a parked document

$
0
0

Hi,

 

How do we release a document which is locked by other user.

i would like to do posting on this particular document and I get error message as F5, 302.

Document & & is locked by another user!

 

Is there any possibility to unlock this document?

 

Thanks,

Venkat Koppala

ABAP Spool to Printer

$
0
0

I am reading a spool and converting it to PDF and saving it in application server.

I also want to print this PDF at the physical printer.

 

This will all be in background job.

 

Any help?

 

Any expert pointers would be greatly helpful.    

Spool column width (.htm) in the background job

$
0
0

Dear experts,

I am running the job in the background which produces the spool and send an email (spool receiver) in a .htm format as an attachment.

 

Since the spool is >255 char ( 500 col.) I have tried using different formats, 1023 or 512 however when I open the spool on SM37, the columns are truncated. When I do Display maximum width, it shows all the pages and columns properly. The email attachment also shows truncated.

 

Please let me know if there is anything else needs to be done in order to send the entire spool. The pages are also > 10 and even if the setting is 1-1000 pages, it sends out an email with less pages but > 10.

 

Thanks,

DK

Parked document (FBV1) doesn't exist

$
0
0

Hi,

 

I have this strange problem with the parked document.

I could successfully park document using FBV1 and then trying to post the same document,

but apparently the parked document is missing!

 

When I search using FV02 using the document number that is returned after successful parking

it doesn't display any result!

 

What could be the reason that parked document doesn't exist any more in SAP?

 

Thanks in anticipation.

 

Venkat

Dynamic refresh of ABAP report

$
0
0

I am working on a simple report where iam displaying records from 2 internal tables separately. And when i select a record from 1st internal table and click on my custom 'MOVE' button, the record should display in the list of 2nd internal table (and vice versa) without clicking any other button.

 

All i wanted to know is, can we dynamically refresh the ABAP report ?

Catching error Dynpro_field_conversion to avoid dump....

$
0
0

Hello Giris,

 

I have a custom dialog program with some fields on screen. Now when user enters the custom dialog program, the program reads data from custom table and populates the data in those fields.

 

There are instances when the data in the custom table is bad data (incrrect datatypes). So program gives Dynpro_field_conversion error dump. I don't want this dump to happen but program to catch this error and populate the screen fields with no values.

 

How can I catch Dynpro_field_conversion error and avoid dump ?

 

Regards,

TS.


Z report output in an excel file

$
0
0

Hi All,

 

We have developed a Z report and by running it by giving selection criteria, the output of the same is available in an excel sheet in email. We check the excel sheet as an attachment in SOSG T code.

 

The excel sheet has 10 columns with 10 fields. The data is ok in all the 10 columns. But there is a formatting issue in 1st column as below.

 

The issue is when we open the excel file , the data in the first column does not appear. When we increase the width by 12 inches of the first column of the excel sheet   we can see the data.  Naturally the data is right aligned  with space to the left

 

We want to know why this is so. Also this issue does not happen in development system. In test system only , we have an issue with the 1st column.

 

earlier we had 8 columns with eight fields of the said Z report but there was no issue in all the columns and the data appears in the 1st column without increasing   the column width  (in both dev and main test system ).

 

It is only later that we have added 2 additional columns to the extreme right to make the total columns 10 and after this addition we have the issue with first column as explained above (the issue is not in devep system but only test system ) ?

 

regards

 

Pamela

Download/Upload file using HTTPS

$
0
0

Hi everyone!

 

Is there a way from an ABAP code I could dowload/upload files from/to a HTTPS url?

 

My requirement it's copy files from a remote server (Microsoft Sharepoint) to a location on my application server.

 

P.s.: FTP cannot be used and the idea it's a simple solution for that.

 

Thanks!

 

Raphael Xavier

Dynamic generations of Rows and Columns in Script

$
0
0

Dear Experts,

Please let me to know how to solve this below mentioned issue.

 

How to generate dynamically the rows and columns in a script output based on the no:of records

For instance : If only two records exists, only two rows and necessary columns should appear.

 

Attempted : I had tried ULINE and VLINE commands, but it is not working properly.

I have to do this with the help of PERFORM and ENDPERFORM command.

Kindly suggest me how to calculate the dynamic positions using subroutines.

 

Regards

Veena

SAP ALV OO

$
0
0

Hi again guys, I ran into another problem, when i use the Class, I get an error message " type CL_SALV_LAYOUT_GRID is unkown  ". I though that was a standard class....I'am referring link: http://help.sap.com/saphelp_nw70ehp3/helpdata/en/4e/c11c9634f62b90e10000000a42189d/content.htm?frameset=/en/4e/c1b012087c2b91e10000000a42189d/frameset.htm My program is as follows:

 

 

SAP ALV OO

REPORT ZHELLOWORLD.

TABLES: ZDBTABLE.

 

DATA: itab_ZDBTABLE TYPE STANDARD TABLE OF ZDBTABLE.

DATA: ref_CL_SALV_TABLE TYPE REF TO CL_SALV_TABLE.

 

START-OF-SELECTION.

  SELECT ZDBTABLE~code qty

    FROM  ZDBTABLE

    INTO  CORRESPONDING FIELDS OF TABLE itab_ZDBTABLE.

 

  " Create Instance

  CALL METHOD CL_SALV_TABLE=>FACTORY

    IMPORTING   R_SALV_TABLE = ref_CL_SALV_TABLE

    CHANGING    T_TABLE = itab_ZDBTABLE.

 

  " Text After ALV Output

  DATA: ref_CL_SALV_FORM_TEXT TYPE REF TO CL_SALV_FORM_TEXT.

  DATA: ref_CL_SALV_FORM_LABEL TYPE REF TO CL_SALV_FORM_LABEL.

  DATA: ref_CL_SALV_LAYOUT_GRID TYPE REF TO CL_SALV_LAYOUT_GRID.

 

  CREATE OBJECT ref_CL_SALV_LAYOUT_GRID.

  ref_CL_SALV_FORM_LABEL = ref_CL_SALV_LAYOUT_GRID->CREATE_LABEL(

                                              TEXT   = '1.1 LABEL'

                                              ROW    = 1

                                              COLUMN = 2 ).

 

  ref_CL_SALV_FORM_TEXT = ref_CL_SALV_LAYOUT_GRID->CREATE_TEXT(

                                              TEXT   = '1.2 TEXT'

                                              ROW    = 1

                                              COLUMN = 2 ).

 

  ref_CL_SALV_FORM_LABEL->SET_LABEL_FOR( ref_CL_SALV_FORM_TEXT ).                                             

 

  ref_CL_SALV_FORM_TEXT = ref_CL_SALV_LAYOUT_GRID->CREATE_TEXT(

                                              TEXT   = '2.2 TEXT'

                                              ROW    = 2

                                              COLUMN = 2 ).

  ref_CL_SALV_TABLE->SET_TOP_OF_LIST( ref_CL_SALV_LAYOUT_GRID ).

 

  " Display Table

  ref_CL_SALV_TABLE->DISPLAY( ).

 

 

Thanks again guys. (PS: if I change CL_SALV_LAYOUT_GRID to CL_SALV_LAYOUT, I get the message that "CREATE_LABEL" is Private or Protected (Unknown) to CL_SALV_LAYOUT

Table join between PA0001 and CATSCO

$
0
0

Hi Experts,

 

I am working on a report and want to select only those employess who entered time (CATSCO data ) based on work date which is a select option on selection screen and i want to filter them based on personnel subarea ( PA0001-BRTL) on selection screen.

 

Below is my select query:

 

select fields from pa0001 and catsco inner join based on pernr

CATSCO-WORKDATE in s_workdate

PA0001-SUBAREA    in s_subarea

 

 

PA0001 has 5 entries for a pernr and subarea on selection screen  and it fetch all of them .

CATSCO has 3 entries for pernr and given workdate on selection screen and it brings all of them.

 

 

I am expecting the query to pick only 1 entry from PA001 based on subarea and workdate on selection screen but i dont know how i can use

ENNDA and BEGDA based on workdate on screen.

 

Can someone please suggest?

at new col1

$
0
0

Hi ,

 

I need to process only the  first lines that meets where conditions .I my table col1 one is not unique , table is sorted by col1 and col2

and i have several entries for same value  in col1. This loop is processing line by line  without takin in account at new statemen .

Please advice

 

Thanks

 

 

Loop at itab ino wa itab

  where ( col1 between  date1 an date1)

and    col2 < date1

 

at new col2.

* do something

endat

endloop.

BAPI_SAG_GETDETAIL is not reading condition records

$
0
0

Hi Friends,

 

My requirement is to update Condition value for a specific condition type(item level) in Scheduling Agreements. I am developing a program using BAPIs BAPI_SAG_GETDETAIL and BAPI_SAG_CHANGE. My problem is BAPI_SAG_GETDETAIL is not fetching condition records of both header and items eventhough i passed document no. and value 'X' for all exporting parameters like ITEM_DATA, CONDITION_DATA...etc in BAPI and it is fetching other

details like header, item, schedule, shipping etc but not conditon records. There is no messages in return table.

 

Please suggest me to get conditon records as well in BAPI or any other way to achieve my requirement.

 

FYI even I tried with BDC program instead of BAPIs and which is not fulfilling my requirement as there is no provision to select desired item and condition type in recording.

 

 

Thanks in advance.

Shravan


Issue when printing copies from Smart Form that uses a copy window

$
0
0

Hi All,

 

I am facing an issue when I try to print a Smart Form that uses a copy window ...the system only considers the copy window from the first copy (= original) when I print several copies in the actual paper prints....I also looked at notes 1097022 and Note 92482 - Spool kernel patches (collective note) but not useful....

 

The spool list looks OK with a copy 1,2 and 3...see attachment of the code i am trying and the smartform design..appreciate any inputs on this..

 

Tnx

How to display/read the values from the dynamic table in selection screen

$
0
0
Hello Experts,
I have a scenario where i need to display a dynamic table based on the user entered value in the selection screen.
For example if the user enters M1 it has to read all the L's tied to that M1 and dispplay as the L's as columns. In the below example I have L1,L2,L3,L4,L5 tied to M1. The field should be editable and possible values are numeric.
M1L1L2L3L4L5
01/23/2013
01/24/2013
01/25/2013
01/26/2013
01/27/2013
When the user populates the table like below I have to save all the values in the table.
M1L1L2L3L4L5
01/23/201308020
01/24/201320000
01/25/201305000
01/26/201330000
01/27/201320000

 

Please help in understanding dynamic display of table and reading the values from the table. Is there any array concept in ABAP?

I am thinking of using READ LINE statement but how can i differentiate the values in the table?

 

Appreciate all your suggestions/inputs on this.

 

Thanks!

TSV_TNEW_PAGE_ALLOC_FAILED -ERROR

$
0
0

Hi,

 

I have a requirement to compare two fields ( brand form and product category) based on the product codes, whether these two fields have any blank values. If yes then send all those error records in email as an excel attachment.

 

My concern is there are no restrictions for the product codes and we have more than 80 lakhs records. When i compare if there are 30 lakhs error records among this, I am not able to send an email.

 

Program terminates With the error " TSV_TNEW_PAGE_ALLOC_FAILED  ".

 

I am using    'SO_NEW_DOCUMENT_ATT_SEND_API1' Function module to send mail as excel attachment.

 

Could anyone please help me. Is there any possible ways to get the whole records in excel sheet. This is BI related ABAP code.

 

 

 

Regards

Siva

Execute external command - batch file

$
0
0

Hello all,

 

Well I searched everything here and couldn't find an answer to my problem. I want to execute a java program on the application server. I therefore put the java file on the server and tested it there in the command line. Everything works perfect. I created a batch file and tested it on the server. Everything ok. JAVA_HOME is set correctly on the server, so no trouble there.

 

Now I want to execute this command from an Abap Program.

What I did:

 

In SM69 I created a new command:

- operating system command: cmd /c

- parameters: c:\test.bat

 

Note, when I execute the bat directly on the server, everything works perfectly. But when I test this command with SM69 (or SM49), I always a get "java.lang.NoClassDefFoundError". I tried everything I could think of (set java_home in bat, various directories ...). I then removed the java program from the .bat and put simply  "md c:\test" in the .bat. No problem at all.

I tried to test FM SXPG_COMMAND_EXECUTE. There I get a "COMMAND NOT FOUND" error, although it has been correctly defined in SM69 (name and operating system).

I also tried to call the java command directly in SM69 (as a parameter, as a operating command , etc ..). I still get "java.lang.NoClassDefFoundError"

 

Could somebody help me?

 

Thank you,

 

Arlindo

 

P.S. Contents of .bat:

Just 1 line (URLReader being the program to be called)

 

java URLReader

Passing values between 3rd party application?

$
0
0

Hi all i am thinking of creating a plugin for MS word to connect sap pass>-<and retrieve data from sap.I am new to this .Please share your suggestions and idea on to access sap data from MS word through a plugin.

Viewing all 8332 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>