‎2006 Aug 10 8:18 PM
I need some help in finding some documentation or getting some information on BDC processing. We have some consultants in France helping us with a project and the developer is using BDC code like
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
The above code is in a include module that is called by the main programs. I would to understand how this process works and what are the advantages and disadvantages of this type of coding. I am checking here in the forums, tying to narrow my searches to find any documentation, but so far no luck. If someone could point me in the right direction, that would be very helpful.
thanks in advance for the help.
I am trying to find some documentation in this to
‎2006 Aug 10 8:32 PM
It's basically like screen scraping. The system is entering data into program screens the same way a user would. As another person mentioned, good for automating repetitive tasks.
I see two primary advantages. First, you can be sure that the BDC program has all the functionality of whatever manual entry would normally achieve. For example, all the same authorization checks would be performed. Second, if you are trying to programatically enter data into an existing SAP screen and there is no equivalent function module, this lets you do that.
The disadvantage is that it is slower than other options like BAPIs. There's also a learning curve as it is hard to read until you become familiar with it.
Hope this helps,
Brett
‎2006 Aug 10 8:21 PM
>>The above code is in a include module that is called by the main programs.
This is the normal practice to avoid repetitive coding.. I don't see any disadvantage following this approach.
~Suresh
‎2006 Aug 10 8:22 PM
‎2006 Aug 10 8:23 PM
"the advantages and disadvantages of this type of coding."
Over what other type of coding?
Rob
‎2006 Aug 10 8:24 PM
This type of coding could be used to fill in screens in SAP automatically.
If you don't know what to pass of values. Then start transaction SM35 and do a recording of the action you want to automate.
Add is some source to make it clear voor you. It is source used for HR.
refresh BDCDATA.
Global
perform bdc_dynpro using 'SAPMP50A' '1000'.
perform bdc_field using 'BDC_OKCODE' '=INS'.
perform bdc_field using 'RP50G-PERNR' sap_pernr.
perform bdc_field using 'RP50G-TIMR6' 'X'.
perform bdc_field using 'RP50G-CHOIC' '0000'.
Infotype 0000
perform bdc_dynpro using 'MP000000' '2000'.
perform bdc_field using 'BDC_OKCODE' '=UPD'.
perform bdc_field using 'P0000-MASSN' rec_leaving-massn.
perform bdc_field using 'P0000-MASSG' rec_leaving-massg.
perform bdc_field USING 'P0000-BEGDA' rec_leaving-begda.
Infotype 0001
perform bdc_dynpro using 'MP000100' '2000'.
perform bdc_field using 'BDC_OKCODE' '=UPD'.
perform bdc_field USING 'P0001-BEGDA' rec_leaving-begda.
perform bdc_field USING 'P0001-ENDDA' rec_leaving-endda.
perform bdc_field USING 'P0001-ABKRS' '99'.
Infotype 0016
perform bdc_dynpro using 'MP001600' '2012'.
perform bdc_field using 'BDC_OKCODE' '/ENXT'.
Infotype 0008
perform bdc_dynpro using 'MP000800' '2000'.
perform bdc_field using 'BDC_OKCODE' '/ENXT'.
Infotype 0007
perform bdc_dynpro using 'MP000700' '2012'.
perform bdc_field using 'BDC_OKCODE' '/ENXT'.
Infotype 9304
perform bdc_dynpro using 'MP930400' '2000'.
perform bdc_field using 'BDC_OKCODE' '/ENXT'.
perform bdc_transaction using 'PA30'.
‎2006 Aug 10 8:32 PM
It's basically like screen scraping. The system is entering data into program screens the same way a user would. As another person mentioned, good for automating repetitive tasks.
I see two primary advantages. First, you can be sure that the BDC program has all the functionality of whatever manual entry would normally achieve. For example, all the same authorization checks would be performed. Second, if you are trying to programatically enter data into an existing SAP screen and there is no equivalent function module, this lets you do that.
The disadvantage is that it is slower than other options like BAPIs. There's also a learning curve as it is hard to read until you become familiar with it.
Hope this helps,
Brett
‎2006 Aug 10 8:36 PM
Hi Timothy,
the first subroutine is called to fix the program name and screen name.the second subroutine is used to pass a value to a particular field.As this part is common for all bdc programs, they might be using a common include for similar programs.
Hope this helps.
regards,
keerthi.
‎2006 Aug 10 8:37 PM
hi timothy,
check these links...
http://www.sappoint.com/abap/bdcconcept.pdf
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm
http://www.planetsap.com/bdc_main_page.htm
http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_gci1068429_tax293481,00.html