Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

problem in charecters.

Hi experts,

i have a small problem. like am using the field mseg-sgtxt.

i need to add some fields to get total.but in these fields there are some charecters like AB, BC like that so i cannot total it. so when there are charecters i want to push them in a variable.else if they have values i want to total them.

so am using like this

if wa_mseg-sgtxt ca sy-abcde

variable = wa_mseg-sgtxt.

else.

total= wa_mseg-sgtxt + wa_mseg-sgtxt1.

endif.

but am not getting with this..

help me if u have more suggestions

Regards

Sunita

Tags:
Former Member
Former Member replied

Decalare separate variables

DATA : TEMP_RIPE TYPE N

TEMP_UDRIPE TYPE N,

TEMP_UNRIPE TYPE N,

TEMP_OVRRPE TYPE N,

TEMP_EMPTY TYPE N,

TEMP_ROTTEN TYPE N.

In the else Part.

condense wa_mseg-ripe.

temp_ripe = wa_mseg-ripe.

do the above for all fields.

and add

total = temp_ripe + temp_udripe .... all the fields.

Regards

Madhan

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question