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: 

Handling radiobutton in LSMW

Former Member
0 Kudos
734

Hi all,

Wanted to know how to handle radio button in LSMW?

Lets say for gender kay[GESCH] in my flat file I have either 1 or 2.

1 for Male and 2 for female.

Now based on that , the radio button for male or female has to be selected.

I am assuming I need to write code in "Maintain translations and user defined routines."

How exactly? Any inputs are welcome.

Regards,

Hari Kiran

1 ACCEPTED SOLUTION

Former Member
0 Kudos
170

Hi,

Check the field name of the radiobutton and mark it as 'X' as per your input, 1 or 2.

hope this will help,

ags.

7 REPLIES 7

Former Member
0 Kudos
171

Hi,

Check the field name of the radiobutton and mark it as 'X' as per your input, 1 or 2.

hope this will help,

ags.

0 Kudos
170

Look at it this way,

when I do my recording in LSMW, I will be either selecting male or female.

Only one of those 2 fields is captured in the recording.

Lets take the Infotype 0002 personnel data as an example.

Here , when I Do my recording in LSMW I need to select male or female radio button .

so only one gets captured.

Here, we do have a choice like Q0002- GESCN1 " Not sure about the field GESCN1 , but it's similar

Q0002-GESCN2

Now I believe I need to add these fields in LSMW recording. I know how to do that.

I would like to know the code to populate these 2 based on the values in flat file , i.e 1 or 2.

Thank u for answering.

Hari

0 Kudos
170

Is the following good enough,

If SOURCE-GESCH = 1.

Q0002-GESN1 = 'X'.

ELSE IF SOURCE-GESCH = 2.

Q0002-GESN2 = 'X'.

ENDIF.

0 Kudos
170

Yes this is what i am suggesting. Please check the same.

and also let me know if this works..

thnx,

ags.

Edited by: Agasti Kale on Jun 5, 2008 6:38 PM

0 Kudos
170

ok, I will try it out and let you know.

I am not closing the thread for the moment.

Any more inputs are welcome.

Warm regards,

Hari Kiran

0 Kudos
170

Hi,

Didnt get the chance to test it, as I wont be loading into that table.

But, I am confident, the code will work.

Regards,

Hari Kiran

0 Kudos
170

Hi all,

I didn't get to work on Gender Key radio buttons.

But ended up having a similar requirement.

Here's the requirement.

In my flat file I will be getting the value '0' or '1' for the field 'TXBAS' {tax Basis} in Infotype PA0065.

When the value is '0' the the radio button TAXCM {Cumulative Tax Basis} has to be selected and when the value is '1' the radiobutton {TAXWK{Week/Month Basis} has to be selected.

I added the following simple code for the 2 fields in the the step "Maintain field mapping and conversion rules".

I selected the respective field then clicked on "RULE" and then the radio button "Abap code".Here's the code---

IF ZHRINF0065-TXBAS = 0

ZHRI0065-TAXCM = 'X'.

ENDIF.

Similarly for the other field-----

IF ZHRINF0065-TXBAS = 1.

ZHRI0065-TAXWK = 'X'.

ENDIF.

The above codes solved the issue of handling radio buttons in LSMW.

Warm Regards,

Hari Kiran