Well, since I’ve been talking about BDC, seems logical that I should actually show you how to get a BDC Recording. It’s easier than you might expect, but reading the results can take some effort.
Use this menu path to start the BDC recorder.
Start a new recording.
Enter in your transaction, and a description. Then press Start Recording. Just to give you an idea, let’s walk through a simple recording.
Now, the biggest thing to keep in mind is to know the steps of your transaction, eliminate extra steps (don’t randomly hit enter) and make sure to populate every field you want to be able to populate in your program.
Fill in the values you want, and then press the Goods Movement Button.
Finally, press Save.
Now, you will get your results:
Now, the recording will give you this result:
0000 T IW41
SAPLCORU 3000 X
0000 BDC_CURSOR CORUF-VORNR
0000 BDC_OKCODE =ENTR
0000 CORUF-AUFNR 4000100
0000 CORUF-VORNR 10
SAPLCORU 3200 X
0000 BDC_CURSOR AFRUD-LEKNW
0000 BDC_OKCODE /00
0000 AFRUD-ARBPL SERVICE
0000 AFRUD-WERKS 1100
0000 AFRUD-ISMNW_2 28
0000 AFRUD-ISMNU H
0000 AFRUD-LEARR srv
0000 AFRUD-BUDAT 12/06/2013
0000 AFRUD-AUERU
0000 AFRUD-LEKNW
0000 AFRUD-OFMNU H
0000 AFRUD-ISDD 01/11/2013
0000 AFRUD-ISDZ 07:00:00
0000 AFRUD-IDAUE H
0000 AFRUD-IEDD 12/06/2013
0000 AFRUD-IEDZ 23:31:37
0000 AFRUD-PEDZ 24:00:00
SAPLCORU 3200 X
0000 BDC_CURSOR AFRUD-ARBPL
0000 BDC_OKCODE =MB03
0000 AFRUD-ARBPL SERVICE
0000 AFRUD-WERKS 1100
0000 AFRUD-ISMNW_2 28
0000 AFRUD-ISMNU H
0000 AFRUD-LEARR SRV
0000 AFRUD-BUDAT 12/06/2013
0000 AFRUD-OFMNU H
0000 AFRUD-ISDD 01/11/2013
0000 AFRUD-ISDZ 07:00:00
0000 AFRUD-IDAUE H
0000 AFRUD-IEDD 12/06/2013
0000 AFRUD-IEDZ 23:31:37
0000 AFRUD-PEDZ 24:00:00
SAPLCOWB 0130 X
0000 BDC_OKCODE =WEIT
0000 BDC_SUBSCR SAPLCOWB 0806HEADER
0000 BDC_SUBSCR SAPLCOWB 0510TABLE
0000 BDC_CURSOR COWB_COMP-ERFMG(01)
Now, this will translate into the following ABAP code. In a future post, I’ll give you the simple bdc_dyn and bdc_fld form code.
PERFORM bdc_dyn USING ‘SAPLCORU’ ‘3000’.
PERFORM bdc_fld USING CORUF-AUFNR ‘ WA_CNF-AUFNR.
PERFORM bdc_fld USING CORUF-VORNR ‘ WA_CNF-VORNR.
PERFORM bdc_fld USING ‘BDC_OKCODE’ ‘=ENTR’. ” ENTER
PERFORM bdc_dyn USING ‘SAPLCORU’ ‘3200’.
PERFORM bdc_fld USING AFRUD-ISMNW_2 ‘ WA_CNF-TIME.
PERFORM bdc_fld USING AFRUD-LEARR ‘ WA_CNF-LEARR.
PERFORM bdc_fld USING AFRUD-AUERU ‘ WA_CNF-AUERU.
PERFORM bdc_fld USING AFRUD-LEKNW ‘ WA_CNF-LEKNW.
PERFORM bdc_fld USING ‘BDC_OKCODE’ ‘=MB03’. ” ENTER
PERFORM bdc_dyn USING ‘SAPLCOWB’ ‘0130’.
PERFORM bdc_fld USING ‘BDC_OKCODE’ ‘=WEIT’. ” ENTER
* runs transaction defined above, mode ‘A’ goes step by step, use this
* to prototype code, mode ‘N’ runs automatically, use this in
* production, mode ‘E’ generates errors only, use this for debug
COMMIT WORK AND WAIT.
CALL TRANSACTION ‘IW41’ USING bdcdata
MODE ‘N’ ” mode ‘A’,’N’,’E’
UPDATE ‘S’
MESSAGES INTO mess.
That’s it for today. The recording is pretty easy. Using it, well, I’ll get to that soon 🙂
Thanks for reading,
As always, thanks for reading and don't forget to check out our SAP Service Management Products at my other company JaveLLin Solutions,
Mike