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

unable to pass a value

Former Member
0 Likes
743

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
Read only

former_member221770
Contributor
0 Likes
712

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.

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.

4 REPLIES 4
Read only

former_member221770
Contributor
0 Likes
713

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.

Read only

Former Member
0 Likes
712

seems like ur code is right..

wat is the value of wa_tbl_li-i_qty.

regards

gv

Read only

Former Member
0 Likes
712

What's the definition for 'wa_tbl_li'?

Read only

Former Member
0 Likes
712

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