Skip to Content

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

Dyanamic Variable name

Hi all,

I want to know if we can name variables dynamically. I am to create a report that summarizes the payment of all the employees against few suppliers.

Let me try to expain u

A supplier means essentially 2-3 wagetypes.

I have

1.Get pernr, Then I get itab1 which stores all the values for all wagetypes for an employee.

Now I loop through the suppliers and find the relevant wagetypes.

now i have itab2 with all the wagetypes i need.


loop at itab1.

read itab2 wid wagetype itab1-wagetype.

this is all fine

Issue is where do is store value?

as in I cannot use a temporary variable since I dont knw

a. how many wagetypes a supplier mite have

Also I will have to loop through suppliers again and that would be a different set of wagetypes.

can I somehow name a variable such as it is dynamic

i.e temp_8790 for 8790

and temp_8779 for 8779?





I have a doubt here...

Why do you want a variable?? I think you can use an Internal table and store all the relavant data...and display them...

if I am right you have Wage type related to supllier.

You can have this 2 combination in your internal table...

S1 W1

S1 W5..Etc.

Try this out...



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