We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-abap] BDC Program for Populating a ZTable Through SE11

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by angshumanbaruah
on Oct 19 at 1:15 AM
Hi Guys,

I made a BDC program for populating a ZTable through SE11.

The Problems which I am facing are :-

1. The moment I make the recording and transfer to the program, it starts
working properly without any hassles.

2. It will work fine for the next couple of days.

3. But after some days (probably after 7 or 10 days), whenever I will run
the program then the excel will not get uploaded properly and will stop in
the screen where it will ask for the the table entries again (i.e. SE11 when you press the create entries
button).

4. But when I do the recording again than again it starts working properly.

5. For example :- (Part of the program in Bold letters - The code is in the
attachment) :-

perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=EDIT'.
perform bdc_field using 'RSRD1-TBMA'
'X'.
perform bdc_field using 'RSRD1-TBMA_VAL'
'ZSEC_STOCK'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
*perform bdc_field using 'BDC_CURSOR'
* 'DD02D-DDTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=TDED'.
*perform bdc_field using 'DD02D-DDTEXT'
* 'GN : Table for material stock details'.
perform bdc_dynpro using '/1BCDWB/DBZSEC_STOCK' '*0111*'.
perform bdc_field using 'BDC_CURSOR'
'ZSEC_STOCK-VRKME'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'ZSEC_STOCK-MATNR'
wa_ko01-matnr.
perform bdc_field using 'ZSEC_STOCK-FKDAT'
wa_ko01-fkdat.
perform bdc_field using 'ZSEC_STOCK-KUNNR'
wa_ko01-kunnr.
perform bdc_field using 'ZSEC_STOCK-WERKS'
wa_ko01-werks.
perform bdc_field using 'ZSEC_STOCK-FKIMG'
wa_ko01-fkimg.
perform bdc_field using 'ZSEC_STOCK-VRKME'
wa_ko01-vrkme.
perform bdc_dynpro using '/1BCDWB/DBZSEC_STOCK' '*0111*'.
perform bdc_field using 'BDC_OKCODE'
'/EEND'.
perform bdc_field using 'BDC_CURSOR'
'ZSEC_STOCK-MATNR'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
*perform bdc_field using 'BDC_CURSOR'
* 'DD02D-DDTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=WB_END'.
*perform bdc_field using 'DD02D-DDTEXT'
* 'GN : Table for material stock details'.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_OKCODE'
'/ENDE'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
*perform bdc_transaction using 'SE11'.

*perform close_group.

call transaction 'SE11' using it_bdcdata mode 'E' update 'A' messages into
messtab.
refresh it_bdcdata.

6. In the above code the bold letters dynpro no. '0111' - will stop working
after sometime but when I make the new recording, I will get the new dynpro
no. i.e.
'0101' or '0001' etc.

7. When I copy the new number to the previous number i.e. '0111' then the
program starts working properly.

8. Please tell me the solution for the problem as this is a tedious job to
check whether the code is working properly or not everytime and make a new
recording everytime
it stops working.

9. Please look at my code and tell me where am I going wrong.

Thanks in Advance,
Angshuman Baruah
__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
View this online
  
Popular White Papers

In the Spotlight
SAP BusinessObjects: Dashboards and Analytics. Learn more about this Toobox.com Marketplace online course.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language