2008 Jun 05 5:20 PM
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
2008 Jun 05 5:23 PM
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.
2008 Jun 05 5:23 PM
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.
2008 Jun 05 5:32 PM
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
2008 Jun 05 5:35 PM
Is the following good enough,
If SOURCE-GESCH = 1.
Q0002-GESN1 = 'X'.
ELSE IF SOURCE-GESCH = 2.
Q0002-GESN2 = 'X'.
ENDIF.
2008 Jun 05 5:36 PM
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
2008 Jun 05 5:43 PM
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
2008 Jun 10 6:21 AM
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
2008 Jul 03 10:18 AM
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