‎2020 Mar 24 6:27 PM
I had a requirement like.. ( selection screen report), not an module pool program.
Field 1: personnel number
field 2: first name
field 3: last name
field 4: date of birth
When i enter personnel number and click on enter the below fields value need to be populated.
‎2020 Mar 24 7:41 PM
Hi
You can write a code to populate in the following event.AT SELECTION-SCREEN.
PARAMETERS : P_pernr type PA0001-pernr,
P_name1 type nam31,
p_name2 type name2 .
AT SELECTION-SCREEN.
select single sname , ename from pa0001 into (p_name1 , p_name2) where pernr = p_pernr When you press Enter, AT SELECTION SCREEN event will be fired and you can handle the data populate here
‎2020 Mar 24 7:41 PM
Hi
You can write a code to populate in the following event.AT SELECTION-SCREEN.
PARAMETERS : P_pernr type PA0001-pernr,
P_name1 type nam31,
p_name2 type name2 .
AT SELECTION-SCREEN.
select single sname , ename from pa0001 into (p_name1 , p_name2) where pernr = p_pernr When you press Enter, AT SELECTION SCREEN event will be fired and you can handle the data populate here
‎2020 Mar 25 12:05 PM
Thanks for answer @Venkat
But here i am facing different issue that is, when i click enter the data is populating but when i click on execute button (F8) also data is populating but this should not happen, when i click on enter the fields data should be populated and when i click F8 different screen need to be execute.
‎2020 Mar 25 12:17 PM
Okay, then you add the IF statement as below
AT SELECTION-SCREEN.
IF SY-UCOMM NE 'ONLI'.
select single sname , ename from pa0001 into (p_name1 , p_name2) where pernr = p_pernr
ENDIF.
‎2020 Mar 25 5:13 AM
manideep31,
You can also handle this solution using F4. When you select the value for the first field using F4, subsequent fields will be filled during the same action.
Recommend you to go through the event:
AT SELECTION-SCREEN ON VALUE-REQUEST ON PERNR.
* Call the below FM for the required field to be populated along with other fields.
CALL FUNCTION F4IF_INT_TABLE_VALUE_REQUEST.
Its own documentation will have a detailed information on how the FM can be used.
Regards!
‎2020 Mar 25 12:07 PM
Thanks for Answer @satish kumar,
yeah we can handle but business is expecting different mode 🙂 .