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: 

please help

Former Member
0 Kudos
87

In

Now system is printing calculation like this 16%,2%,4%,1%

Values 16,2,4,1 are taken from internal table and % is taken from script.

Now the requirement is print like this as shown

EDU CESS -2%

S&HE CESS-1%

EDU CESS-2%

S& HE CESS-1%

ADCD-4% .

I have to add these texts,for this iam not getting any logic , please help me

In program the logic is like this

FORM item_details.

SELECT *

FROM /ivl/zmb_bedut

INTO TABLE it_bedut

WHERE doctype = it_behdr-doctype

AND docno = it_behdr-docno

AND docyear = it_behdr-docyear.

SELECT *

FROM /ivl/zmb_beitm

INTO CORRESPONDING FIELDS OF it_beitm

WHERE doctype = it_behdr-doctype

AND docno = it_behdr-docno

AND docyear = it_behdr-docyear.

LOOP AT it_bedut WHERE doctype = it_beitm-doctype

AND docno = it_beitm-docno

AND docyear = it_beitm-docyear

AND boeitno = it_beitm-boeitno.

CASE it_bedut-dutcode.

WHEN 'BCD'.

MOVE it_bedut-dutyrat TO it_beitm-dutyratbcd.

MOVE it_bedut-sysvalu TO it_beitm-sysvalubcd.

WHEN 'CVD'.

MOVE it_bedut-dutyrat TO it_beitm-dutyratcvd.

MOVE it_bedut-sysvalu TO it_beitm-sysvalucvd.

WHEN 'SAD'.

MOVE it_bedut-dutyrat TO it_beitm-dutyratsad.

MOVE it_bedut-sysvalu TO it_beitm-sysvalusad.

  • insert on 120704 for education cess $03

WHEN 'ZCES'. "zces

MOVE it_bedut-dutyrat TO it_beitm-dutyratcess.

MOVE it_bedut-sysvalu TO it_beitm-sysvalucess.

WHEN 'ZEDC'. "zedc

MOVE it_bedut-dutyrat TO it_beitm-dutyratedc.

MOVE it_bedut-sysvalu TO it_beitm-sysvaluedc.

  • end of insert on 120704 for education cess $03

WHEN 'ZHCS'.

MOVE it_bedut-dutyrat TO it_beitm-dutyrathcs. "$04

MOVE it_bedut-sysvalu TO it_beitm-sysvaluhcs. "$04

WHEN 'ZHDC'. "$04

MOVE it_bedut-dutyrat TO it_beitm-dutyrathdc. "$04

MOVE it_bedut-sysvalu TO it_beitm-sysvaluhdc. "$04

it_beitm-totassval = it_beitm-totassval + it_beitm-sysvalubcd +

it_beitm-assval.

it_beitm-totsysvalubcd = it_beitm-totsysvalubcd + it_beitm-sysvalubcd.

ENDCASE.

In script they defind % like this

&BEITM-DUTYRATBCD(CIZ)'%'&,, &BEITM-SYSVALUBCD(CI)&,,

&BEITM-CETNO(CIZ)&,, &VAR1(CIZ)&,,&VAR2(.0CIZ)'%'&,,&VAR3(CIZ)&,,

&VAR4(CIZ)&

,,,,,,,,&BEITM-MATLDES+16&

,,,,,,,, &BEITM-MATNR(CIZ)&,,,,,,,,,,,,

&VAR5(CIZ)& commented for not displaying

,,&VAR9(.0CIZ)'%'& ,,&VAR10(CIZ)&

&BEITM-DUTYRATSAD(CIZ)&,,&SAD(CIZ)&

&VAR9&,,&VAR10&

&VAR7(CIZ)&,,&VAR8(CIZ)&

,,,,,,,,,,,,,,,,,,,,,,&VAR15(.0CIZ)'%'& ,,&VAR16(CIZ)&

,,,,,,,,,,,,,,,,,,,,,,&VAR11(.0CIZ)'%'& ,,&VAR12(CIZ)&

,,,,,,,,,,,,,,,,,,,,,,&VAR17(.0CIZ)'%'& ,,&VAR18(CIZ)&,,&VAR21(CIZ)&

,,,,,,,,,,,,,,,,,,,,,,&BEITM-DUTYRATSAD(.0CIZ)'%'&,,,,&VAR8(CIZ)&

Thanks

1 REPLY 1

Former Member
0 Kudos
60

In Script use like this

BCD: &BEITM-DUTYRATBCD(CIZ)&%

CVD: &BEITM-SYSVALUBCD(CI)&%

To get the heading, Value and percentage symbol

Write in different lines to get the data in multiple lines...

Reward if helpful...