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 related problem

naimkhans_babi
Active Participant
0 Likes
451

Hello friends...

I am having a problem with my BDC Program code. I am developing a BDC program for MIGO. I dont have option to use BAPI_GOODSM_CREAT for some reasons thats why I am using BDC. well My problem is I am giving the input of mention below table. in internal table one which has a content.

A01 R01 4100000690 23052007 24052007 BB001 41/690 BB001 23052007 1 5 SGN1 2 SGN1 A1

A01 R01 4100000690 23052007 24052007 BB001 41/690 BB001 23052007 1 5 SGN1 3 SGN1 A2

A01 R01 4100000690 23052007 24052007 BB001 41/690 BB001 23052007 2 5 SGN1 2 SGN1 A3

A01 R01 4100000690 23052007 24052007 BB001 41/690 BB001 23052007 2 5 SGN1 3 SGN1 A4

A01 R01 4100000690 23052007 24052007 BB001 41/690 BB001 23052007 3 5 SGN1 2 SGN1 A5

A01 R01 4100000690 23052007 24052007 BB001 41/690 BB001 23052007 3 5 SGN1 3 SGN1 A6

to the BDC loop I am receiving perffect record in the BDC table which is :

1 SAPLMIGO 1 X

2 0 BDC_OKCODE #NAME?

3 0 GODYNPRO-ACTION A01

4 0 GODYNPRO-REFDOC R01

5 0 GODYNPRO-PO_NUMBER 4100000690

6 0 BDC_CURSOR GOHEAD-LFSNR

7 0 GOHEAD-BLDAT 23052007

8 0 GOHEAD-LFSNR BB001

9 0 GOHEAD-BUDAT 24052007

10 SAPLMIGO 1 X

11 0 BDC_OKCODE #NAME?

12 0 BDC_CURSOR GOHEAD-BKTXT

13 0 GOHEAD-BLDAT 23052007

14 0 GOHEAD-LFSNR BB001

15 0 GOHEAD-BUDAT 24052007

16 0 GOHEAD-BKTXT 41/690

17 0 GODYNPRO-DETAIL_ZEILE 1

18 0 GOITEM-ERFMG 5

19 0 GOITEM-LGOBE SGN1

20 SAPLMIGO 1 X

21 0 BDC_OKCODE #NAME?

22 0 GOHEAD-BLDAT 23052007

23 0 GOHEAD-LFSNR BB001

24 0 GOHEAD-BUDAT 24052007

25 0 GOHEAD-BKTXT 41/690

26 0 BDC_CURSOR GOITEM-ZEILE(01)

27 0 GODYNPRO-DETAIL_ZEILE 1

28 0 GOITEM-ERFMG 5

29 0 GODYNPRO-DETAIL_TAKE X

30 SAPLMIGO 1 X

31 0 BDC_OKCODE #NAME?

32 SAPLMIGO 1000 X

33 0 BDC_OKCODE #NAME?

34 0 BDC_CURSOR GOSPLIT-ERFMG(1)

35 0 GOSPLIT-ERFMG(1) 2

36 0 BDC_CURSOR GOSPLIT-LGOBE(1)

37 0 GOSPLIT-LGOBE(1) SGN1

38 0 BDC_CURSOR GOSPLIT-CHARG(1)

39 0 GOSPLIT-CHARG(1) A1

40 SAPLMIGO 1000 X

41 0 BDC_OKCODE #NAME?

42 SAPLMIGO 1000 X

43 0 BDC_OKCODE #NAME?

44 0 BDC_CURSOR GOSPLIT-ERFMG(2)

45 0 GOSPLIT-ERFMG(2) 3

46 0 BDC_CURSOR GOSPLIT-LGOBE(2)

47 0 GOSPLIT-LGOBE(2) SGN1

48 0 BDC_CURSOR GOSPLIT-CHARG(2)

49 0 GOSPLIT-CHARG(2) A2

50 SAPLMIGO 1000 X

51 0 BDC_OKCODE #NAME?

52 SAPLMIGO 1 X

53 0 BDC_OKCODE #NAME?

54 0 J_1IEXHEAD-EXNUM BB001

55 0 J_1IEXHEAD-EXDAT 23052007

56 SAPLMIGO 1 X

57 0 BDC_OKCODE #NAME?

my problem is when i am splitting the quantity :

it give me only one raw with the filled value another batch record is not visible,

please help me to solve this problem:

what i recevied in that raw is:

2 SGN1 A1.

please see my code on BDC part and suggest me what i have missed here.

LOOP AT int_record.

FREE bdcdata.

ON CHANGE OF int_record-exdat.

PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK_GO'.

PERFORM bdc_field USING 'GODYNPRO-ACTION'

  • record-action_001.

int_record-action.

PERFORM bdc_field USING 'GODYNPRO-REFDOC'

  • record-refdoc_002.

int_record-refdoc.

PERFORM bdc_field USING 'GODYNPRO-PO_NUMBER'

  • record-po_number_004.

int_record-po_number.

PERFORM bdc_field USING 'BDC_CURSOR'

'GOHEAD-LFSNR'.

PERFORM bdc_field USING 'GOHEAD-BLDAT'

  • record-bldat_005.

int_record-bldat.

PERFORM bdc_field USING 'GOHEAD-LFSNR'

  • record-lfsnr_006.

int_record-lfsnr.

PERFORM bdc_field USING 'GOHEAD-BUDAT'

  • record-budat_007.

int_record-budat.

PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK_GO'.

PERFORM bdc_field USING 'BDC_CURSOR'

'GOHEAD-BKTXT'.

PERFORM bdc_field USING 'GOHEAD-BLDAT'

  • record-bldat_010.

int_record-bldat.

PERFORM bdc_field USING 'GOHEAD-LFSNR'

  • record-lfsnr_011.

int_record-lfsnr.

PERFORM bdc_field USING 'GOHEAD-BUDAT'

  • record-budat_012.

int_record-budat.

PERFORM bdc_field USING 'GOHEAD-BKTXT'

  • record-bktxt_013.

int_record-bktxt.

PERFORM bdc_field USING 'GODYNPRO-DETAIL_ZEILE'

  • record-detail_zeile_015.

int_record-detail_zeile.

PERFORM bdc_field USING 'GOITEM-ERFMG'

  • record-erfmg_017.

int_record-erfmg.

PERFORM bdc_field USING 'GOITEM-LGOBE'

  • record-lgobe_098.

int_record-lgobe.

PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=MIGO_OK_LINE_CLICK'.

PERFORM bdc_field USING 'GOHEAD-BLDAT'

  • record-bldat_021.

int_record-bldat.

PERFORM bdc_field USING 'GOHEAD-LFSNR'

  • record-lfsnr_022.

int_record-lfsnr.

PERFORM bdc_field USING 'GOHEAD-BUDAT'

  • record-budat_023.

int_record-budat.

PERFORM bdc_field USING 'GOHEAD-BKTXT'

  • record-bktxt_024.

int_record-bktxt.

PERFORM bdc_field USING 'BDC_CURSOR'

'GOITEM-ZEILE(01)'.

PERFORM bdc_field USING 'GODYNPRO-DETAIL_ZEILE'

  • record-detail_zeile_026.

int_record-detail_zeile.

PERFORM bdc_field USING 'GOITEM-ERFMG'

  • record-erfmg_028.

int_record-erfmg.

PERFORM bdc_field USING 'GODYNPRO-DETAIL_TAKE'

  • record-detail_take_100.

'X'.

PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=MIGO_OK_SPLIT_QUAN'.

LOOP AT int_record1 WHERE po_number = int_record-po_number AND

exnum = int_record-exnum AND

exdat = int_record-exdat AND

detail_zeile = int_record-detail_zeile.

  • int_record2 = int_record.

l_index = l_index + 1.

PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK_SP_CH'.

CONCATENATE 'GOSPLIT-ERFMG(' l_index ')' INTO l_field.

PERFORM bdc_field USING 'BDC_CURSOR'

l_field.

PERFORM bdc_field USING l_field

int_record1-erfmg1.

CLEAR l_field.

CONCATENATE 'GOSPLIT-LGOBE(' l_index ') ' INTO l_field.

PERFORM bdc_field USING 'BDC_CURSOR'

l_field.

PERFORM bdc_field USING l_field

int_record1-lgobe1.

CLEAR l_field.

CONCATENATE 'GOSPLIT-CHARG(' l_index ') ' INTO l_field.

PERFORM bdc_field USING 'BDC_CURSOR'

l_field.

  • 'GOSPLIT-CHARG'.

PERFORM bdc_field USING l_field

  • PERFORM bdc_field USING 'GOSPLIT-CHARG'

int_record1-charg.

PERFORM bdc_dynpro USING 'SAPLMIGO' '1000'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK_GOON'.

ENDLOOP.

PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK_GO'.

PERFORM bdc_field USING 'J_1IEXHEAD-EXNUM'

int_record-exnum.

PERFORM bdc_field USING 'J_1IEXHEAD-EXDAT'

int_record-exdat.

PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=OK_POST1'.

PERFORM bdc_transaction USING 'MIGO_GR'.

ENDON.

CLEAR l_index.

ENDLOOP.

1 ACCEPTED SOLUTION
Read only

naimkhans_babi
Active Participant
0 Likes
384

In addition to the filled value what i received:

in the table control of the MIGO trnasactions split qunatity screen i must receive this way.

2 SGN1 A1

3 SGN 1 A2

you are help will be appreciated.

thanking you

Regards

Naeem

1 REPLY 1
Read only

naimkhans_babi
Active Participant
0 Likes
385

In addition to the filled value what i received:

in the table control of the MIGO trnasactions split qunatity screen i must receive this way.

2 SGN1 A1

3 SGN 1 A2

you are help will be appreciated.

thanking you

Regards

Naeem