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

IDOC Status 30: How to proceed

$
0
0

Hi All,

 

I have developed a program calling MASTER_IDOC_DISTRIBUTE to output an idoc. When I run the program, it generates an IDOC with status 30:IDoc: 0000000000208081 Status: IDoc ready for dispatch (ALE service), Receiver exists , No filters , No conversion , No version change.

 

I want the program to automatically output an IDOC in a file. How do I do this?

 

Thanks.

 

Kenny


From which DB table the Record is being Fetched?

$
0
0

I started ma career 4 months ago in ABAP, & today a functional consultant called me & pointed on the screen and asked me where this field is getting data from, I didn't developed the code so I debugged it for like 5 min(It was a BIG report) and finally said " It is coming from yada yada table", same question was asked to a 6 years experienced Abaper.. Even he didn't developed the code but he did a bit of CTRL + F thing debugged the program and told the answer in less than a min. How did he do that. Are there any shortcuts to find?

Save OTF data

$
0
0

Hello All

 

  We are exploring the following possibilities for saving the output generated by smartform into custom database tables, we would later retrieve the

saved data and then show that up as PDF in one of our WDA applicaitons.

 

1. get OTF data and then save as standard text 

2. convert OTF to xstring and then save to database

3. convert OTF to xstring and then save to app server files(OPEN/CLOSE dataset)

4. Generic Object Services?

 

option 1 doesn't see like a elegant solution and i'm not sure if GOS would help, option 2 looks like a good solution(but i'm not sure),

will option 3 work in multiple app server case scenario, your guidance is much appreciated.

 

Thanks

ALV GRID OO data change problem

$
0
0

We use an editable alv grid oo in a customer project.

We have the problem thaht the customer enters a value in one cell and then without enter or leaving the cell pushes save.

In the save routine we trigger the check data changed event and we have the the enter event triggered. But the data in inserted in to the cell

is not available in and after the data changed it gets lost.

If the user leves the cell with tab or enters a second one check data changed works but not when he enters a value and starts the save

routine.

Is there a way to get this values?

 

Regards

 

Dirk

Byte or Character String search

$
0
0

Can anybody guide how to found the  'Byte or Character String' from any web url through sap wheather the given 'Byte or Character String'  it is avalible or not?

Transfer Dataset creates 2 lines rather than 1

$
0
0

Hello All,

         I am facing an issue while creating txt files on app server. I am moving Financial Documents' data to app server file. In some cases one transfer dataset statement creates two line rather than one. The new line is inserted right after SGTXT (CHAR50) field. I noticed that where ever this problem occurs the SGTXT has /# in the end.

       I tried to replicate this issue in Dev box using same kind of SGTXT value but I could not. I am not sure what the cause is. for open dataset I used following parameters.

 

OPEN DATASET filename FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE

            IGNORING CONVERSION ERRORS  REPLACEMENT CHARACTER ' '.

 

 

The system is ECC 6.0 . I understand that passing NON-UNICODE does not make any sense here but I would like to replicate the issue first before I make the code change.

 

Any ideas ??

 

Thanks !


script format for no zeros in qty

$
0
0

Hello In script

if qty is 12.345

i want to display same

but 12.000

should be 12

..what format can i use.

also in &qty(IN11)& wat does the formating mean.

How to create a PDF output which is in binary data to Spool request, so we can select print spool to print the pdf

$
0
0

Please help with a solution to print the PDF content which is available in binary format to SPOOL request for print.

 

In Web UI, on click of a custom print button in a view, I select the custom developed PDF form and get the form output in Binary Data.


Interactive Report data overlapping or conflicting

$
0
0

Hi,     In Interactive programming report if on the first page(first list) of the output if I have data from 2 separate internal tables,one below the other how can they be made to work independent of each other so that the detail list(second list) output does not create conflict/overlapping between the output of list 1st and 2nd internal table  of the first list.The 2nd List Output displayed data should come from mutually exclusive table 1 and table 2 of the first list and show mutually exclusive of each other results on the second list.

CL_SALV_BS_RUNTIME_INFO

Submit Report with ALV Layout options?

$
0
0

Hello Experts,

 

  Is it possible to Execute a standard Report (SUBMIT) by specifying ALV Layout properties.I am trying to specify Layout properties beforehand(Like hide certain fields etc).Also please guide how to create a ALV layout dynamically.Your help is highly appreciated.

 

Thanks

prabaharan

about objectid in cdpos

$
0
0

hai ,

 

i am writing  a audit report  in which i used a 'material'  as the object class ,through objectid i am fetching data previously now  i wanted to add a new fields from mara - mtpos_mara,

mvke - mtpos,

marc -prctr

 

 

plz help me with a example code

Where to enter the G/L Account and Material Values in MIRO trasaction

$
0
0

When entering in MIRO trasaction where do i enter the G/L account and Material values.

set the Delivery Completed flag (EKPO-ELIKZ) and Final Delivery flag (EKPO-EGLKZ) for the PO

$
0
0

Hi Experts,

 

I need to set item wise delivery completion flag and final delivery flag for purchase order where type is UB(stock transport order).

 

For example:

ebeln  ebelp  elikz  eglkz

--------- --------- ------- ---------

1001     10     X     X

1001     20                        

1001     30     X     X

 

1002     10     X     X

1002     20     X     X

1002     30              

 

1003     10     X     X

1003     20              

 

Like that I need to set. I am using BAPI_PO_CHANGE for this. My question is: how to pass the data to this BAPI for above scenario? Every time pass one item

to the BAPI or pass all items for each PO to the BAPI.

 

Also some time getting some error message like no data change. Kindly give some solution for above mentioned problems.

 

Thanks in advance....

Regards,

Arindam Samanta.

ERROR WHILE BDC SESSION TRANSACTION

$
0
0

Hello Guru g,

 

                     I am learning BDC session transaction . I open SHDB done recording for MM01, done editing in code but when i checked it i am getting error message

( The FORM "BDC_DYNPRO" doesnot exist). Please go through the coding part and please tell me why i am getting this error message & what can i do to correct it.

 

 

report ZMMO12013_S

       no standard page heading line-size 255.

 

 

*include bdcrecx1.

*

*start-of-selection.

*

*perform open_group.

 

 

DATA : BEGIN OF ITAB OCCURS 0,

       MATNR LIKE MARA-MATNR,

       MBRSH LIKE MARA-MBRSH,

       MTART LIKE MARA-MTART,

       MAKTX LIKE MAKT-MAKTX,

       MEINS LIKE MARA-MEINS,

      END OF ITAB.

 

 

DATA : BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.

 

 

CALL FUNCTION 'UPLOAD'

EXPORTING

*   CODEPAGE                             = ' '

   FILENAME                                 = ' '

   FILETYPE                                    = 'DAT'

*   ITEM                                           = ' '

*   FILEMASK_MASK                 = ' '

*   FILEMASK_TEXT                    = ' '

*   FILETYPE_NO_CHANGE            = ' '

*   FILEMASK_ALL                  = ' '

*   FILETYPE_NO_SHOW              = ' '

*   LINE_EXIT                     = ' '

*   USER_FORM                     = ' '

*   USER_PROG                     = ' '

*   SILENT                        = 'S'

* IMPORTING

*   FILESIZE                      =

*   CANCEL                        =

*   ACT_FILENAME                  =

*   ACT_FILETYPE                  =

  TABLES

    DATA_TAB                      = ITAB

* EXCEPTIONS

*   CONVERSION_ERROR              = 1

*   INVALID_TABLE_WIDTH           = 2

*   INVALID_TYPE                  = 3

*   NO_BATCH                      = 4

*   UNKNOWN_ERROR                 = 5

*   GUI_REFUSE_FILETRANSFER       = 6

*   OTHERS                        = 7

          .

IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

 

 

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

*   CLIENT                    = SY-MANDT

*   DEST                      = FILLER8

   GROUP                     = 'MM012013_S'

*   HOLDDATE                  = FILLER8

   KEEP                      = 'X'

   USER                      = SY-UNAME

*   RECORD                    = FILLER1

   PROG                      = SY-CPROG

*   DCPFM                     = '%'

*   DATFM                     = '%'

* IMPORTING

*   QID                       =

* EXCEPTIONS

*   CLIENT_INVALID            = 1

*   DESTINATION_INVALID       = 2

*   GROUP_INVALID             = 3

*   GROUP_IS_LOCKED           = 4

*   HOLDDATE_INVALID          = 5

*   INTERNAL_ERROR            = 6

*   QUEUE_ERROR               = 7

*   RUNNING                   = 8

*   SYSTEM_LOCK_ERROR         = 9

*   USER_INVALID              = 10

*   OTHERS                    = 11

          .

IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

 

 

LOOP AT ITAB.

     REFRESH BDCDATA.

     PERFORM MAPPING.

     CALL FUNCTION 'BDC_INSERT'

      EXPORTING

        TCODE                  = 'MM01'

*        POST_LOCAL             = NOVBLOCAL

*        PRINTING               = NOPRINT

*        SIMUBATCH              = ' '

*        CTUPARAMS              = ' '

       TABLES

         DYNPROTAB              = BDCDATA

*      EXCEPTIONS

*        INTERNAL_ERROR         = 1

*        NOT_OPEN               = 2

*        QUEUE_ERROR            = 3

*        TCODE_INVALID          = 4

*        PRINTING_INVALID       = 5

*        POSTING_INVALID        = 6

*        OTHERS                 = 7

               .

     IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

     ENDIF.

ENDLOOP.

     

CALL FUNCTION 'BDC_CLOSE_GROUP'

* EXCEPTIONS

*   NOT_OPEN          = 1

*   QUEUE_ERROR       = 2

*   OTHERS            = 3

          .

IF SY-SUBRC <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

 

 

FORM MAPPING.

 

 

perform bdc_dynpro      using 'SAPLMGMM' '0060'.

perform bdc_field       using 'BDC_CURSOR'

                              'RMMG1-MTART'.

perform bdc_field       using 'BDC_OKCODE'

                              '=AUSW'.

perform bdc_field       using 'RMMG1-MATNR'

                              ITAB-MATNR.

perform bdc_field       using 'RMMG1-MBRSH'

                              ITAB-MBRSH.

perform bdc_field       using 'RMMG1-MTART'

                              ITAB-MTART.

perform bdc_dynpro      using 'SAPLMGMM' '0070'.

perform bdc_field       using 'BDC_CURSOR'

                              'MSICHTAUSW-DYTXT(01)'.

perform bdc_field       using 'BDC_OKCODE'

                              '=ENTR'.

perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'

                              'X'.

perform bdc_dynpro      using 'SAPLMGMM' '4004'.

perform bdc_field       using 'BDC_OKCODE'

                              '/00'.

perform bdc_field       using 'MAKT-MAKTX'

                              ITAB-MAKTX.

perform bdc_field       using 'BDC_CURSOR'

                              'MARA-MEINS'.

perform bdc_field       using 'MARA-MEINS'

                              ITAB-MEINS.

perform bdc_field       using 'MARA-MTPOS_MARA'

                              'NORM'.

perform bdc_dynpro      using 'SAPLSPO1' '0300'.

perform bdc_field       using 'BDC_OKCODE'

                              '=YES'.

*perform bdc_transaction using 'MM01'.

 

 

*perform close_group.

ENDFORM.


How to pass VTTP-TPNUM & VTTP-TPRFO to IDOC SHPMNT05

$
0
0

Hello Geeks,

 

         We have a scenario where we need to change the existing shipment to add more deliveries through Shipment inbound IDOC.When i look at the VTTP table the only difference i found is these 2 fields VTTP-TPNUM & VTTP-TPRFO .

 

         I tried in the segment like below

      e1edt18-param       = 'TKNUM'.

      e1edt18-qualf       = 'PID'.

      e1edt18-qualf     = 'CHA'.  But the existing delivery is getting replaced with the new one .

 

      Can you please let me know is that possible to create a shipment with multiple delivery through IDOC ?

 

     Appreciate your quick response.

 

Thanks,

Srini.

Alignment Issue in Smartform

$
0
0

Hi All,

     I am facing an issue in smartform. While printing the item data i am getting an extra page for some reason.

 

Example i am printing 2 customer if one customer data ends then new page should start with next customer. In item data, I am printing in the order of item details, total and Balance. All these datas are printing dynamically if the item details exceeded. Particularly if the item details and total printing in first page and because of the page ends balance will print in the second page. In this case some extra item space comes in the third page. Also the second page

balance repeating in the third page with scattered text, after that 2nd customer details is printing.

 

If i execute with 1 customer its working fine. Only if 2 or more customers i am printing i am facing the above issue. This happens only if the balance alone comes in next page.

 

Please  help me to resolve this issue. For the reference i am attaching the screenshot of the issue.

 

 

Thanks,

Karthick V

Reading MS Word file into internal table

$
0
0

Hi,

     I have a requirement to read the word files from DMS and then to parse it. To do so i need to have the document content in readable format in an internal table. We are getting the content in xstring format. I need content in plain english. Is there any FM or classes that may be helpfull.

Regards,

Vishal

sapcript language

$
0
0

Hello Everyone ,

 

I have a question regarding sapcript. My original sapscript was in danish , so i converted the script to English and made all the changes needed.

 

The user wants the form to be bilingual . The other language he wants is Portugese. So the form has to be compatible for both English and portugese.

 

How do I acheive that. Is there SAP help link I can look . what will the method . The communication language will be selected by the user . I have made the form in english . If the user selects portugese the form should be printed in P and if he selects E , then should be printed in E.

 

Any help will be appreciated ,

 

Thanks

Mona

BDC on OMS2, need help.

$
0
0

Hello Friends,

 

I have to execute BDC on transaction code OMS2 (Define Material Type). I have done everything except the BDC on selection of User Department.

However much I tried to record and execute BDC on this, I am not successful.

I am attaching the screenshot of the part where I am facing the problem.

 

Please suggest me some solution to this problem. And in case anybody has any alternate solutions (Bapi, LSMW) to this you are welcome.

 

oms2.jpg

 

Saurabh.

Viewing all 8332 articles
Browse latest View live


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