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: 

ABAP code which will use function module during field mapping in LSMW

Former Member
0 Kudos

Hi,

During field mapping in LSMW, for one of the field called field, I want to use a function module 'QF05_RANDOM_INTEGER', which will generate random numbers and map that random number to that field.

How do I write ABAP code which uses function module, during filed mapping for a particluar field in LSMW ?

Please help...

Regards,

Tushar.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Tushar,

You can write in FORM ROUTINE and LSMW.

I hope you know how to write ABAP code at field level.

If not ...

Come to change mode->select the field->Rule->ABAP Code

write a perform statement in ABAP code at field level.

<b>PERFORM test</b> using val

changing valu.

Go to Utilities(at menu)->switch layout-> extras ->select Layout->check Form routine-> it will display a FORM Routine... at bottom

this is the place where you can write some code for

<b> FORM test</b> using value

changing value1

FM call....

.ENDFORM

Get the value1 returned and use for the Field population.

Reward points if this Helps.

Manish

Message was edited by:

Manish Kumar

1 REPLY 1

Former Member
0 Kudos

Hi Tushar,

You can write in FORM ROUTINE and LSMW.

I hope you know how to write ABAP code at field level.

If not ...

Come to change mode->select the field->Rule->ABAP Code

write a perform statement in ABAP code at field level.

<b>PERFORM test</b> using val

changing valu.

Go to Utilities(at menu)->switch layout-> extras ->select Layout->check Form routine-> it will display a FORM Routine... at bottom

this is the place where you can write some code for

<b> FORM test</b> using value

changing value1

FM call....

.ENDFORM

Get the value1 returned and use for the Field population.

Reward points if this Helps.

Manish

Message was edited by:

Manish Kumar