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

Help need

Former Member
0 Likes
556

Hi all,

I am workng on FM. I am using 2 structures to get the output data.

When i am testing FM, data is gettting in 1 strcuture. But Second Structure not poplating in output. How can i do that.

regards,AJAy Ram

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
535

hi

just check

if there is structure mismatch

if no check if ur using corresponding fields of

after then check if there exist entries for the second structure corresponding to first one

regards

ravish

<b>plz dont forget to reward points if helpful</b>

5 REPLIES 5
Read only

Former Member
0 Likes
536

hi

just check

if there is structure mismatch

if no check if ur using corresponding fields of

after then check if there exist entries for the second structure corresponding to first one

regards

ravish

<b>plz dont forget to reward points if helpful</b>

Read only

Former Member
0 Likes
535

Hello Ajay,

Could you please post your code so we can see where the error is?

Regards,

Walter

Read only

0 Likes
535

Here i am giving my code.

APPEND VISUAL_PARTS.----


> First Structure

CLEAR VISUAL_PARTS.

  • Move Inventory for the above material.

if werks+1(1) = '8'.

if werks = '1802'.

if lw_lgort <> 'T001'.

INVENTORY_MAT-matnr = matnr.

INVENTORY_MAT-werks = werks.

INVENTORY_MAT-lgort = lw_lgort.

********Get the Total Stock of the material*************

perform inventory_mat using matnr werks lw_lgort changing w_labst.

INVENTORY_MAT-LABST = w_labst.

APPEND INVENTORY_MAT.----


> Second Strcuctrure

CLEAR INVENTORY_MAT.

endif.

else.

if lw_lgort0(1) = 'M' or lw_lgort0(1) = 'G'

or lw_lgort+0(1) = 'H'.

INVENTORY_MAT-matnr = matnr.

INVENTORY_MAT-werks = werks.

INVENTORY_MAT-lgort = lw_lgort.

********Get the Total Stock of the material*************

perform inventory_mat using matnr werks lw_lgort changing w_labst.

INVENTORY_MAT-LABST = w_labst.

APPEND INVENTORY_MAT.

CLEAR INVENTORY_MAT.

endif.

endif.

endif.

FORM inventory_mat USING P_MARNR

P_WERKS

P_LGORT

CHANGING P_LABST.

clear lw_labst.

select single labst into lw_labst

from mard

where matnr = P_MARNR

and werks = P_WERKS

and lgort = P_LGORT.

if sy-subrc = 0.

P_LABST = lw_labst.

endif.

ENDFORM. " inventory_mat

Please help me in this.

Will give reward points.

regards,AjayRam

Read only

0 Likes
535

Hello Walter,

Did you check my code.

Rewards will be given if helpful answers.

regards,

Ajay Ram

Read only

0 Likes
535

Hello,

Did you try to debug your FM and see if your second structure is filled?

Maybe it's the IF condition that isn't correct : if werks+1(1) = '8'.