hi,

i have requirement below.

i want to calculate 20 percent of wa_ameng .and if wa_menge value is more than 20 percent of wa_ameng then i will capture that value to another varibale.how to write the code please help me

data:wa_ameng type i,

wa_menge type i,

wa_percent type i.

*DATA: BEGIN OF xe1edp10.

INCLUDE STRUCTURE e1edp10.

*DATA: END OF xe1edp10.

*

LOOP AT dint_edidd

WHERE segnam EQ 'E1EDP10'.

CLEAR xe1edp10.

MOVE dint_edidd-sdata TO xe1edp10.

loop at DEKEH .

move dekeh-ameng to wa_ameng.

move dekeh-menge to wa_menge.

endloop.

ENDLOOP.

Hi,

Take the variables of type P with decimals insted of I.

wa_percent = (20 /100) * wa_amen. if wa_menge GT wa_percent wa_percent1 = wa_percent endif.

Thanks,

Sri.

You already have an active moderator alert for this content.

Add decimals to it.

data :wa_ameng type p DECIMALS 2, wa_menge type p DECIMALS 2 , wa_percent type p DECIMALS 2 , wa_percent1 type p DECIMALS 2 .

## Add comment