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

BDC

vallamuthu_madheswaran2
Active Contributor
0 Likes
599

hai friends,

i am doing a BDC program for vk11 in that program, internal table have values and the values are append to FNAM, FVAL but it is not updated to the vk11 transaction. it should take only first value. it is call transaction method . MODE 'A'.

thanks and regards

vallamuthu

6 REPLIES 6
Read only

Former Member
0 Likes
549

can u post ur BDC code,

May be some problem in populating the value for DYNBEGIN

Read only

0 Likes
549

this 'KOMG-REGIO' is not picking the value

data: begin of it_vk11 occurs 0,

KNUM LIKE A508-KNUMH,

VALID_DATE LIKE A508-DATAB,

rego like a508-regio,

end of it_vk11.

data : rego1(3) type c.

select KNUMH DATAB regio from a508 into (it_vk11-KNUM, it_vk11-VALID_DATE, it_vk11-rego)

where "kschl = 'PR00'

  • AND VKORG = itab_mat-vkorg

  • AND VTWEG = itab_mat-vtweg

  • AND PLTYP = '05'

MATNR = ref_mat.

append it_vk11.

endselect.

  • PACK itab_mat-matnr TO TEMP.

  • CONDENSE TEMP.

  • MOVE itab_mat-matnr TO TEMP.

perform bdc_dynpro using 'SAPMV13A' '0100'.

perform bdc_field using 'BDC_CURSOR' 'RV13A-KSCHL'.

perform bdc_field using 'BDC_OKCODE' '=ANTA'.

perform bdc_field using 'RV13A-KSCHL' 'PR00'.

perform bdc_dynpro using 'SAPLV14A' '0100'.

  • perform bdc_field using 'BDC_CURSOR' 'RV130-SELKZ(03)'.

  • perform bdc_field using 'BDC_OKCODE' '=WEIT'.

perform bdc_field using 'RV130-SELKZ(01)' ''.

perform bdc_field using 'RV130-SELKZ(03)' 'X'.

loop at it_vk11.

perform bdc_dynpro using 'SAPMV13A' '1508'.

perform bdc_field using 'BDC_CURSOR' 'KONP-KBETR(01)'.

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'KOMG-VKORG' itab_mat-vkorg.

perform bdc_field using 'KOMG-VTWEG' itab_mat-vtweg.

perform bdc_field using 'KOMG-PLTYP' '05'.

WRITE it_vk11-VALID_DATE TO it_vk11-VALID_DATE.

write it_vk11-REGO to it_vk11-REGO.

move it_vk11-REGO to REGO1.

perform bdc_field using 'KOMG-REGIO' REGO1." '10'.

perform bdc_field using 'KOMG-MATNR(01)' matnr."ITAB_VK11-MATERIAL.",'PD2177'.

*clear it_vk11-REGO.

SELECT SINGLE KBETR FROM KONP INTO AMONT

WHERE KNUMH = it_vk11-KNUM.

WRITE AMONT TO AMT.

perform bdc_field using 'KONP-KBETR(01)' AMT."' 1200'.

perform bdc_dynpro using 'SAPMV13A' '1508'.

perform bdc_field using 'BDC_CURSOR' 'RV13A-DATBI(01)'.

perform bdc_field using 'BDC_OKCODE' '/00'.

perform bdc_field using 'RV13A-DATAB(01)' it_vk11-VALID_DATE."'01.04.2006'.

perform bdc_dynpro using 'SAPMV13A' '1508'.

perform bdc_field using 'BDC_CURSOR' 'KOMG-MATNR(01)'.

perform bdc_field using 'BDC_OKCODE' '=SICH'.

CALL TRANSACTION 'VK11' USING BDCDATA

MODE 'A'

UPDATE 'A'

MESSAGES INTO MESSTAB.

endloop.

Read only

andreas_mann3
Active Contributor
0 Likes
549

Hi,

have you 1st recorded your bdc with SHDB ?

A.

Read only

Former Member
0 Likes
549

Do not refresh BDC table before calling FM BDC_INSERT.

Check for this

Read only

Former Member
0 Likes
549

Check the Function Group <b>V14A</b>. I always prefer to use function modules to create condition records, instead of BDC. Also check the FM <b>RV_CONDITION_POST</b> there.

Hope this helps you.

~thomas.

Read only

vallamuthu_madheswaran2
Active Contributor
0 Likes
549

This message was moderated.