2006 Nov 17 12:15 PM
Hi friends,
I am new to BDC .I am just trying a simple code which is written already.
This is the simple code to fill the transaction VK13 first screen.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RV13A-KSCHL'
wa_report-kschl.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(01)'
'X'.
CALL TRANSACTION 'VK13' USING i_bdc_tbl
MODE 'A'.
FORM bdc_dynpro USING program dynpro.
CLEAR i_bdc_tbl.
wa_bdc_tbl-program = program.
wa_bdc_tbl-dynpro = dynpro.
wa_bdc_tbl-dynbegin = 'X'.
APPEND wa_bdc_tbl TO i_bdc_tbl.
ENDFORM. "BDC_DYNPRO
FORM bdc_field USING fnam fval.
CLEAR i_bdc_tbl.
MOVE fnam TO wa_bdc_tbl-fnam.
MOVE fval TO wa_bdc_tbl-fval.
APPEND wa_bdc_tbl TO i_bdc_tbl.
ENDFORM. "BDC_FIELD
When execute this code it is just showing the empty screen of transaction vk13. It is not filling the condition type field with whatever value i am passing. When go in debugg mode i am not getting the logic again and again it is going to the first screen of vk13 and asking to enter the value whwn the statement CALL TRANSACTION is getting executed. It is clear to me.
My main doubt is we are clearing the internal table i_bdc_tbl before calling the transaction once we move the value to the specific field.I am not getting what they tried to do there.Simply moving one record to internal table and again clearing it then moving a next record and clearing it again before calling the transaction.
What we are trying to do by this?Can any one explain me.
Please help me out in understanding this.
Thanks in Advance.
2006 Nov 17 12:21 PM
"My main doubt is we are clearing the internal table i_bdc_tbl before calling the transaction once we move the value to the specific field.I am not getting what they tried to do there"...
clear itab. " This statement doesn't clear the internal table .This clears only the header. There must be some other problem with the code.
Regards,
Ravi
Hi friends,
I am new to BDC .I am just trying a simple code which is written already.
This is the simple code to fill the transaction VK13 first screen.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RV13A-KSCHL'
wa_report-kschl.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(01)'
'X'.
CALL TRANSACTION 'VK13' USING i_bdc_tbl
MODE 'A'.
FORM bdc_dynpro USING program dynpro.
CLEAR i_bdc_tbl.
wa_bdc_tbl-program = program.
wa_bdc_tbl-dynpro = dynpro.
wa_bdc_tbl-dynbegin = 'X'.
APPEND wa_bdc_tbl TO i_bdc_tbl.
ENDFORM. "BDC_DYNPRO
FORM bdc_field USING fnam fval.
CLEAR i_bdc_tbl.
MOVE fnam TO wa_bdc_tbl-fnam.
MOVE fval TO wa_bdc_tbl-fval.
APPEND wa_bdc_tbl TO i_bdc_tbl.
ENDFORM. "BDC_FIELD
When execute this code it is just showing the empty screen of transaction vk13. It is not filling the condition type field with whatever value i am passing. When go in debugg mode i am not getting the logic again and again it is going to the first screen of vk13 and asking to enter the value whwn the statement CALL TRANSACTION is getting executed. It is clear to me.
My main doubt is we are clearing the internal table i_bdc_tbl before calling the transaction once we move the value to the specific field.I am not getting what they tried to do there.Simply moving one record to internal table and again clearing it then moving a next record and clearing it again before calling the transaction.
What we are trying to do by this?Can any one explain me.
Please help me out in understanding this.
Thanks in Advance.
2006 Nov 17 12:21 PM
"My main doubt is we are clearing the internal table i_bdc_tbl before calling the transaction once we move the value to the specific field.I am not getting what they tried to do there"...
clear itab. " This statement doesn't clear the internal table .This clears only the header. There must be some other problem with the code.
Regards,
Ravi
2006 Nov 17 12:25 PM
Hi Shri,
You can go thru these links for more info on BDC:
http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sap-img.com/bdc.htm
www.sappoint.com/abap/bdcconcept.pdf
http://www.sap-img.com/abap/learning-bdc-programming.htm
http://www.sapdevelopment.co.uk/bdc/bdchome.htm
http://www.planetsap.com/bdc_main_page.htm
Reward points if this helps.
Manish
2006 Nov 17 12:25 PM
check whether ur passing the internal table data to work area or not before passing the values...Loop at internal table into wa_report...Then all the perform statements needs to be written...
2006 Nov 17 12:32 PM
What is wa_report whether it is internal table or work area.
if this an internal table then u r not reading the table
Place u r code in between
loop at internaltablename.
// BDC coding
Call transaction statement
endloop.
2006 Nov 17 12:35 PM
Have a look at below link for info abt BDC.
http://help.sap.com/saphelp_erp2005/helpdata/en/fa/097119543b11d1898e0000e8322d00/frameset.htm
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |