Application Development 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: 

unable to pass a value

Former Member
0 Kudos

just want to ask why the the code below unable to pass the value of wa_tbl_li-i_qty to MSEG-ERFMG(0)? what is the problem in my code?

*************************************

data: begin of i_tble_li occurs 0,

matnr like mseg-matnr,

i_qty type i,

werks like mseg-werks,

end of i_tble_li.

loop at i_tble_li.

wa_tbl_li = i_tble_li.

PERFORM bdc_dynpro USING 'SAPMM07M' '0421'.

PERFORM bdc_field USING:

'bdc_cursor' 'MSEG-ERFMG(01)',

'bdc_okcode' '/00',

'MSEGK-KONTO' i_tble_hdr-konto,

'MSEG-MATNR(01)' wa_tbl_li-matnr,

'MSEG-ERFMG(01)' wa_tbl_li-i_qty,

'MSEG-LGORT(01)' i_tble_hdr-lgort,

'MSEG-WERKS(01)' wa_tbl_li-werks,

'bdc_subscr' 'SAPMM07M',

'bdc_subscr' 'SAPLKACB'.

endloop.

1 ACCEPTED SOLUTION

former_member221770
Contributor
0 Kudos

Hi Donna,

What is the definition of WA_TBL_LI-QTY?

It looks to me like I_TBLE_LI has a header line.

Instead of using WA_TBL_LI, use I_TBLE_LI as parameters to your subroutine. ie

PERFORM bdc_field USING:

'bdc_cursor' 'MSEG-ERFMG(01)',

'bdc_okcode' '/00',

'MSEGK-KONTO' i_tble_hdr-konto,

<b>'MSEG-MATNR(01)' i_tble_li-matnr,

'MSEG-ERFMG(01)' i_tble_li-i_qty,</b>

'MSEG-LGORT(01)' i_tble_hdr-lgort,

<b>'MSEG-WERKS(01)' i_tble_li-werks,</b>

'bdc_subscr' 'SAPMM07M',

'bdc_subscr' 'SAPLKACB'.

Cheers,

Pat.

4 REPLIES 4

former_member221770
Contributor
0 Kudos

Hi Donna,

What is the definition of WA_TBL_LI-QTY?

It looks to me like I_TBLE_LI has a header line.

Instead of using WA_TBL_LI, use I_TBLE_LI as parameters to your subroutine. ie

PERFORM bdc_field USING:

'bdc_cursor' 'MSEG-ERFMG(01)',

'bdc_okcode' '/00',

'MSEGK-KONTO' i_tble_hdr-konto,

<b>'MSEG-MATNR(01)' i_tble_li-matnr,

'MSEG-ERFMG(01)' i_tble_li-i_qty,</b>

'MSEG-LGORT(01)' i_tble_hdr-lgort,

<b>'MSEG-WERKS(01)' i_tble_li-werks,</b>

'bdc_subscr' 'SAPMM07M',

'bdc_subscr' 'SAPLKACB'.

Cheers,

Pat.

Former Member
0 Kudos

seems like ur code is right..

wat is the value of wa_tbl_li-i_qty.

regards

gv

Former Member
0 Kudos

What's the definition for 'wa_tbl_li'?

Former Member
0 Kudos

Hi,

Set the break point and check the value for

wa_tbl_li-i_qty, it is like 10.00 EA or 10.00

if it is 10.00 EA you make it like

wa_tbl_li-i_qty = wa_tbl_li-i_qty+0(15)

Cheers,

Sasi