Application Development and Automation 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: 
Read only

SM20 problem

Former Member
0 Likes
581

Hi all,

We tried to run tcode sm20 for a period of 3 months, but it gave TIMEOUT error. So we tried to use a BDC to record the transaction with users in the text file. The start date & End date & time are given in the Selection-screen. We use those values in BDC for the start date, start time & end date. But when we run the BDC, the start date, time & end date & user field from the txt file are not getting populated. It just takes the current system date & time.

Can anyone pls explain how to run the BDC for SM20?

1 REPLY 1
Read only

Former Member
0 Likes
390

No Vijay, There might be some problem with your bdc program. I just did one recording and it worked fine. See the code below for the initial screen


report ZSM20
       no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.
perform open_group.

perform bdc_dynpro      using 'SAPMSM20' '0200'.
perform bdc_field       using 'BDC_CURSOR'
                              'DY_END_DATE'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'DY_START_DATE'
                              '05.01.2006'.
perform bdc_field       using 'DY_START_TIME'
                              '03:00:00'.
perform bdc_field       using 'DY_END_DATE'
                              '05.02.2006'.
perform bdc_field       using 'RSAUTYPE-SAPUSER'
                              'MYNAME'.
perform bdc_field       using 'RSLGTYPE-TCODE'
                              'TCOD'.
perform bdc_field       using 'RSAUTYPE-SECCLS2'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS5'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS7'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECLEVLOW'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS3'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS4'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS6'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS1'
                              'X'.
perform bdc_field       using 'RSLGLAYOUT-MAXPAG'
                              '80'.
perform bdc_dynpro      using 'SAPMSM20' '0200'.
perform bdc_field       using 'BDC_CURSOR'
                              'DY_START_TIME'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'DY_START_DATE'
                              '05.01.2006'.
perform bdc_field       using 'DY_START_TIME'
                              '03:00:00'.
perform bdc_field       using 'DY_END_DATE'
                              '05.02.2006'.
perform bdc_field       using 'RSAUTYPE-SAPUSER'
                              'TGEORGE'.
perform bdc_field       using 'RSLGTYPE-TCODE'
                              'SE38'.
perform bdc_field       using 'RSAUTYPE-SECCLS2'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS5'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS7'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECLEVLOW'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS3'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS4'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS6'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS1'
                              'X'.
perform bdc_field       using 'RSLGLAYOUT-MAXPAG'
                              '80'.
perform bdc_dynpro      using 'SAPMSM20' '0200'.
perform bdc_field       using 'BDC_OKCODE'
                              '/EBACK'.
perform bdc_field       using 'BDC_CURSOR'
                              'DY_START_TIME'.
perform bdc_field       using 'DY_START_DATE'
                              '05.01.2006'.
perform bdc_field       using 'DY_START_TIME'
                              '03:00:00'.
perform bdc_field       using 'DY_END_DATE'
                              '05.02.2006'.
perform bdc_field       using 'RSAUTYPE-SAPUSER'
                              'TGEORGE'.
perform bdc_field       using 'RSLGTYPE-TCODE'
                              'SE38'.
perform bdc_field       using 'RSAUTYPE-SECCLS2'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS5'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS7'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECLEVLOW'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS3'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS4'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS6'
                              'X'.
perform bdc_field       using 'RSAUTYPE-SECCLS1'
                              'X'.
perform bdc_field       using 'RSLGLAYOUT-MAXPAG'
                              '80'.
perform bdc_transaction using 'SM20'.

perform close_group.

Cheers,

Please mark points if helpful

Thomas.