Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC on WE19

0 Kudos
452

Hello All,

My req is to call WE19, 2000 times for a DELFOR IDOC.

I am trying to write a BDC for this transaction, but getting an error that 'No recording for Menu Transaction'.

Can you guys think of any other solution to this requirment?

Edited by: Senthilnathan Natarajan on Jan 29, 2009 1:07 PM

3 REPLIES 3

Former Member
0 Kudos
199

Hi Senthil,

Kindly find the below code.


report ZPROGRAM_WE19
       no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro      using 'SAPMSED7' '0010'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSED7START-EXIDOCNUM'.
perform bdc_field       using 'BDC_OKCODE'
                              'CREA'.
perform bdc_field       using 'MSED7START-SEL_EXIDOC'
                              'X'.
perform bdc_field       using 'MSED7START-UNICODE'
                              'X'.
perform bdc_field       using 'MSED7START-EXIDOCNUM'
                              '0000000000000002'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '04/43'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRSL'.
perform bdc_dynpro      using 'SAPLSPO4' '0400'.
perform bdc_field       using 'BDC_CURSOR'
                              'SVALD-VALUE(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=FURT'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '04/43'.
perform bdc_field       using 'BDC_OKCODE'
                              '=EXIT'.
perform bdc_dynpro      using 'SAPMSED7' '0010'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSED7START-EXIDOCNUM'.
perform bdc_field       using 'BDC_OKCODE'
                              '=EXIT'.
perform bdc_field       using 'MSED7START-SEL_EXIDOC'
                              'X'.
perform bdc_field       using 'MSED7START-EXIDOCNUM'
                              '2'.
perform bdc_field       using 'MSED7START-UNICODE'
                              'X'.
perform bdc_transaction using 'WE19'.

perform close_group.

It is working fine.

Please check again.

Regards,

-Syed.

Former Member
0 Kudos
199

Hi Senthil,

You can also check this:


report ZPROGRAM_WE19_TE
       no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro      using 'SAPLSYSF' '0800'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EEXIT'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSYSF-STRING'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '04/03'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 2'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 3'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 4'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 5'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 6'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 7'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 8'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 9'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 10'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 11'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 12'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 13'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 14'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 15'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 16'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 17'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 18'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 19'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 20'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 21'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=PZ 22'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_OKCODE'
                              '=CANC'.
perform bdc_dynpro      using 'SAPMSED7' '0010'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSED7START-SEL_MSGTYP'.
perform bdc_field       using 'BDC_OKCODE'
                              '=CREA'.
perform bdc_field       using 'MSED7START-SEL_EXIDOC'
                              ''.
perform bdc_field       using 'MSED7START-SEL_IDOCTP'
                              ''.
perform bdc_field       using 'MSED7START-SEL_MSGTYP'
                              'X'.
perform bdc_field       using 'MSED7START-MESSAGETYP'
                              'DELFOR'.
perform bdc_field       using 'MSED7START-FILENAME'
                              ''.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '04/08'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRSL'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '09/11'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRSL'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '12/22'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRSL'.
perform bdc_dynpro      using 'SAPLSPO4' '0300'.
perform bdc_field       using 'BDC_CURSOR'
                              'SVALD-VALUE(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=FURT'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '14/23'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRSL'.
perform bdc_dynpro      using 'SAPLSPO4' '0400'.
perform bdc_field       using 'BDC_CURSOR'
                              'SVALD-VALUE(05)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=FURT'.
perform bdc_field       using 'SVALD-VALUE(05)'
                              'hai'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '15/21'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRSL'.
perform bdc_dynpro      using 'SAPLSPO4' '0400'.
perform bdc_field       using 'BDC_CURSOR'
                              'SVALD-VALUE(07)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=FURT'.
perform bdc_field       using 'SVALD-VALUE(07)'
                              '200.00'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '15/21'.
perform bdc_field       using 'BDC_OKCODE'
                              '=TRAD'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '06/11'.
perform bdc_field       using 'BDC_OKCODE'
                              '=CANC'.
perform bdc_dynpro      using 'SAPMSSY0' '0120'.
perform bdc_field       using 'BDC_CURSOR'
                              '15/21'.
perform bdc_field       using 'BDC_OKCODE'
                              '=EXIT'.
perform bdc_dynpro      using 'SAPMSED7' '0010'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSED7START-FILENAME'.
perform bdc_field       using 'BDC_OKCODE'
                              '=CREA'.
perform bdc_field       using 'MSED7START-SEL_MSGTYP'
                              ''.
perform bdc_field       using 'MSED7START-MESSAGETYP'
                              ''.
perform bdc_field       using 'MSED7START-SEL_FILNAM'
                              'X'.
perform bdc_field       using 'MSED7START-FILENAME'
                              'DELFOR'.
perform bdc_transaction using 'WE19'.

perform close_group.

Regards,

-Syed.

0 Kudos
199

Hi Syed,

Looks like it is an authorization issue.

I am able to record WE19 transaction using SHDB with my friend's user id.

Anyways thanks for your repsonse!!!