SlideShare a Scribd company logo
Input Help (List of Values)
Creating Input Help

Prerequisites
   1) Transport Request [see StepByStepCreateTransportRequestUsingSE80.pdf]
   2) Package [use the package created in the first class] or create new [see
      StepByStep_ABAP_Create_Package.doc]
   3) Copy Z027393_005A as Z027393_007A [See
      StepByStep_Copy_Function_Group_Program.pdf]

Instead of creating from scratch we are using the program created in one of the previous class
ending with ‘005A’ -- duplicating it and making changes. First copy the program and continue
from here.

Note: There are 5 methods to create list of values
1) Fixed Value (DOMAIN LEVEL) - Hard coded list in Data Dictionary – Using domain (of the
Data Element) of the field.
2) Check Tables (FIELD LEVEL) – Specifying the Check table on the Field level.
3) Assigning the "Search Help" repository object (DATA ELEMENT LEVEL) – Create a
"Search Help" Object [as an independent step] and then assign it to data element of the field.
4) Assigning the "Search Help" repository object (SCREEN ELEMENT LEVEL) – Create a
"Search Help" Object [as an independent step] and then assign it to dynpro screen element in
screen painter.
5) Self defined Dropdown List Boxes (SCREEN ELEMENT LEVEL) – Most flexible but
requires simple SQL to populate the list – USES the PROCESS ON VALUE-REQUEST (POV)
flow logic.

In the following instructions, we are creating Input Help using the 4th and 5th methods.

Step by Step Instructions (complete prerequisites shown above
before you proceed)
Launch SE80.

Ensure that you are on the ‘Repository Browser’.

Select Package from the drop down and enter your Package name [ZxxxxxxA] where xxxxxx is
your SAP Login ID or Oracle ID, then click on the [Display] button. Your Function Group
should be displayed below the package [if it was previously copied correctly to this package.]

Open the Function Group Zxxxxxx_007A that was previously copied from Zxxxxxx_005A (if
not already opened.)




                                                                                         1 of 32
Input Help (List of Values)




To display the property page, double click on the program name (node - Zxxxxxx_007A). The
properties may be updated by clicking on the [Change <> Display] icon (Ctrl+F1). If any values
are updated (example: the short text), ensure they are saved by clicking on the [Save] button.




Now, click on the [Main program] button.



                                                                                        2 of 32
Input Help (List of Values)
After the main program is opened, toggle the [Change <> Display] icon (Ctrl+F1) to update the
program code. Note the name of the Main Program [SAPLZ027393_007A] it will be used to
create a transaction code (T-code) later.




Add description on the top as shown.

*&---------------------------------------------------------------------*
*& Module Pool       Z027393_007A
*& DEMO -> Input Help (List of Values.)
*&---------------------------------------------------------------------*

Save the program.

Activate the Function Group by clicking on the [Activate] button on the top tool bar.




                                                                                        3 of 32
Input Help (List of Values)




If a list of objects to be activated is provided, select all the objects (related to this program), by
clicking on each of them and then click on the [Continue] button or [hit Enter] to activate them
all.

Before we make any changes to create the Input Help, we will confirm that the program runs fine
using the T-Code.

If you have not created a Transaction Code while copying the program, create it now.

To create a Transaction Code (T-Code), we need the name of the Function Group Main program
[SAPLZ027393_007A] and use following menu in SE80 (or by directly using T-Code SE93 –
not shown here.)




Enter the Transaction Code name and a short description. Leave remaining fields as default as
shown below on this screen. Click [Continue] or hit [Enter].




                                                                                                 4 of 32
Input Help (List of Values)




Enter program name as [SAPLZ027393_007A] and the (starting) Screen number as [0100].
Save. Accept the Package and the Transport Request in the subsequent screens.


                                                                                   5 of 32
Input Help (List of Values)
Run the program by entering the T-code/Transaction Code [Z027393_007A] or
[/nZ027393_007A], to confirm that the program runs fine.

Note: /n is required if you are not currently in the SAP Easy Access screen, but in another
transaction.




       We will use (5) Self defined Dropdown List Boxes
       (SCREEN ELEMENT LEVEL) – Most flexible but
       requires simple SQL to populate the list for these fields.




                                                                                              6 of 32
Input Help (List of Values)




     We will use (4) Assigning the "Search Help" repository object (SCREEN
     ELEMENT LEVEL) – Create a "Search Help" Object [as an independent
     step] and then assign it to DYNPRO screen element in screen painter for
     this (CITYFROM) and the CITYTO Field in the next TAB.




PART 1). Let us start with the Screen 0100 changes, as mentioned using (5) Self defined
Dropdown List Boxes (SCREEN ELEMENT LEVEL.)

Double click on the screen 0100 under the screen sub-node that is listed under the function group
we are currently working on.




                                                                                          7 of 32
Input Help (List of Values)




Add the PROCESS ON VALUE-REQUEST (POV) Flow Logic as shown.

PROCESS ON VALUE-REQUEST.

 FIELD ZBC400_S_HDR_CURR-CARRID MODULE create_dropdown_box1.

 FIELD ZBC400_S_HDR_CURR-CONNID MODULE create_dropdown_box2.

Save the screen.

Note that modules create_dropdown_box1 and create_dropdown_box2 do not exist yet, we will
now create them using forward navigation.

Double click on the module create_dropdown_box1. The following pop-up is displayed.




                                                                                      8 of 32
Input Help (List of Values)




Click on the ‘Yes’ button.

Since this is a small application, include this new module in include file LZ027393_007AI01
(note the ‘I’ [Input] in the name.)

VALUE-REQUEST (POV) modules are considered an INPUT type rather than OUTPUT types,
because they are activated whenever user generates an event on the screen (click something or
hit a function key).




(Optional) If you are creating a new INCLUDE the following message may be displayed. Click
on [Continue] button or hit Enter.




                                                                                        9 of 32
Input Help (List of Values)

The module is created in the INCLUDE file, add the following code (just need to add the second
line – the empty module shell is already created by the system.)

MODULE CREATE_DROPDOWN_BOX1 INPUT.

dynpro_utilities1=>value_help1( ).

ENDMODULE.                       " CREATE_DROPDOWN_BOX1        INPUT




The code basically calls a static method value_help1 in the class dynpro_utilities1.
(Note: we haven’t defined the CLASS and its STATIC METHOD yet – we will do that in a
minute.)

Save the INCLUDE file.

Click on the Back button to go the Flow Logic of the screen 100 (or double click on the screen
0100 on the left side and then click on the Flow Logic tab.)



                                                                                        10 of 32
Input Help (List of Values)




Double click on the module create_dropdown_box2. The following pop-up is displayed to create
the module using forward navigation.




Click on ‘Yes’, the select the same include file LZ027393_007AI01 again.




                                                                                    11 of 32
Input Help (List of Values)




The module is created in the INCLUDE file, add the following code

MODULE CREATE_DROPDOWN_BOX2 INPUT.

dynpro_utilities1=>value_help2( ).

ENDMODULE.                      " CREATE_DROPDOWN_BOX2      INPUT




                                                                    12 of 32
Input Help (List of Values)




We now need to add the CLASS with the static METHODS value_help1 and value_help2.

Double click on the LZ027393_007ATOP include.

Add the following code (both the DEFINITION and the IMPLEMENTATION of the class)

CLASS DYNPRO_UTILITIES1 DEFINITION.

PUBLIC SECTION.
 CLASS-METHODS value_help1.
 CLASS-METHODS value_help2.

ENDCLASS.                 "DYNPRO_UTILITIES1


CLASS DYNPRO_UTILITIES1 IMPLEMENTATION.

METHOD value_help1.

 TYPES: BEGIN of carrid_line,
        carrid TYPE ZBC400_S_DYNCONN-carrid,


                                                                               13 of 32
Input Help (List of Values)
          END OF   carrid_line.

DATA carrid_list TYPE STANDARD TABLE OF carrid_line.
SELECT distinct carrid from ZBC400_S_DYNCONN into corresponding fields
  of table carrid_list order by carrid.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
 EXPORTING
   retfield = 'CARRID'
   value_org = 'S'
 TABLES
   value_tab = carrid_list
 EXCEPTIONS
  parameter_error = 1
  no_values_found = 2
  OTHERS = 3.
 IF sy-subrc <> 0.

    ENDIF.

ENDMETHOD.

METHOD value_help2.

*   TYPES: BEGIN of connid_line,
*         connid TYPE ZBC400_S_DYNCONN-connid,
*          END OF connid_line.
*
*   DATA connid_list TYPE STANDARD TABLE OF connid_line.
*   SELECT distinct connid from ZBC400_S_DYNCONN into
*   corresponding fields of table
*   connid_list order by connid.

TYPES: BEGIN of connid_line,
        connid TYPE ZBC400_S_DYNCONN-connid,
        CITYFROM TYPE ZBC400_S_DYNCONN-CITYFROM,
        END OF connid_line.

DATA connid_list TYPE STANDARD TABLE OF connid_line.
*SELECT distinct connid CITYFROM from ZBC400_S_DYNCONN into
* corresponding fields of table connid_list order by connid.
SELECT distinct connid from ZBC400_S_DYNCONN into corresponding fields
of table connid_list order by connid.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
 EXPORTING
   retfield = 'CONNID'
   value_org = 'S'
 TABLES
   value_tab = connid_list
 EXCEPTIONS
  parameter_error = 1
  no_values_found = 2
  OTHERS = 3.
 IF sy-subrc <> 0.




                                                                         14 of 32
Input Help (List of Values)
  ENDIF.
ENDMETHOD.

ENDCLASS.                 "DYNPRO_UTILITIES1




The function 'F4IF_INT_TABLE_VALUE_REQUEST' is already defined by SAP, so does not
have to be redefined.
On the layout of the Screen 100 to access the field properties of ZBC400_S_HDR_CURR-
CARRID field and select ‘list’ from the Dropdown property.




                                                                              15 of 32
Input Help (List of Values)




Or make this change directly on the Text/I/O template Tab (of the Element list Tab) of the screen
properties.




                                                                                        16 of 32
Input Help (List of Values)




Repeat the same for the ZBC400_S_HDR_CURR-CONNID field as shown below




                                                                        17 of 32
Input Help (List of Values)




Or




                                   18 of 32
Input Help (List of Values)




We have now created the INPUT HELP for the two fields on the screen 100. We have used the
‘Self defined Dropdown List Boxes (SCREEN ELEMENT LEVEL).’ As mentioned this is the
most flexible but requires simple SQL to populate the list.

Activate and run the program using the transaction id created earlier.

Depending on what need to be displayed change the SQL select statement in the STATIC
METHOD of the CLASS.

SELECT distinct connid from ZBC400_S_DYNCONN into corresponding fields of
table connid_list order by connid.




Or



                                                                                   19 of 32
Input Help (List of Values)
SELECT distinct connid from ZBC400_S_DYNCONN into corresponding fields of
table connid_list where connid < '1004' order by connid.




Or add a description field to see a description in the list

SELECT distinct connid CITYFROM from ZBC400_S_DYNCONN into corresponding
fields of table connid_list order by connid.




PART 2) Let us now work on the Screen 0200 (actually subscreens 0201 and 0202) changes, as
mentioned using (4) Assigning the "Search Help" repository object (SCREEN ELEMENT
LEVEL) – Create a "Search Help" Object [as an independent step] and then assign it to dynpro
screen element in screen painter.

We need to first create the repository object ‘Search Help’. Once created since this is a
repository object any one can use it.




                                                                                            20 of 32
Input Help (List of Values)




Enter a new/unique Search Help name as shown below. Use a unique name – example:
Zxxxxxx_SRCH where xxxxxx is your SAP Login ID or Oracle ID




Click on the Enter button or hit Enter.

Enter a description and click on the Selection Method search (dropdown)




                                                                                   21 of 32
Input Help (List of Values)




You may search for database tables or for views.




                                                     22 of 32
Input Help (List of Values)




Select ZCITY_TBL

Save the search help and enter appropriate package name.




Enter the appropriate workbench request.




Enter the search help parameters (enter manually or click on the search for list of values for
various parameters line by line.) Then select the EXP check box for both and the LPos and SPos
fields as shown below. LPos is Position in the hit list of an elementary search help. SPos is
Position in dialog box of an elementary search help.


                                                                                      23 of 32
Input Help (List of Values)




Search screen shown below for the above parameters in case you wish to select and not enter
these manually.




                                                                              LPos




                                                                                       24 of 32
Input Help (List of Values)
Note: See the next screen to understand the significance of the LPos and SPos parameters.




Save the search help object and activate it, by clicking on the Save button and Activate button
respectively. If multiple objects are displayed to Activate, select all or all those which are
relevant.

The next step is to associate the search help object (Z027393_SRCH or Zxxxxxx_SRCH) to the
required field ZBC400_S_HDR_CURR-CITYFROM. This field is on the screen 0201. Open the
screen as shown below and double click on the CITYFROM Field to access the properties. Enter
the search help object Z027393_SRCH or Zxxxxxx_SRCH into the Search Help field as shown
below.




                                                                                          25 of 32
Input Help (List of Values)




Alternately this can also be done directly from the screen’s Reference Tab that is under the
Element List tab as shown below. Save and Activate the screen.




                                                                                          26 of 32
Input Help (List of Values)




Repeat the same for the other field (ZBC400_S_HDR_CURR-CITYTO) that needs the Search
Help of the list of values to be displayed. The field is on screen 0202 as shown below.




                                                                                  27 of 32
Input Help (List of Values)




Similarly this can also be done directly from the screen’s Reference Tab that is under the
Element List tab as shown below.




                                                                                             28 of 32
Input Help (List of Values)




Save and Activate the screen.

Run the program by using the Transaction Code created earlier.




The search help can be accessed for Carried ID, Connection ID and for both the CITY fields as
shown in the next few screenshots.




                                                                                       29 of 32
Input Help (List of Values)
Screen 100




Screen 200 (Tab 1)




                                                   30 of 32
Input Help (List of Values)




                              31 of 32
Input Help (List of Values)
Screen 200 (Tab 2)




                                                   32 of 32

More Related Content

PDF
Step bystep abap_field help or documentation
PPT
Abap slide class3
PDF
Ingles 2do parcial
PDF
swingbasics
DOCX
Change transport system in SAP
PDF
Step bystep abap_changinga_singlerecord
DOCX
Change and Transport System (CTS) in SAP
PPTX
Graphical User Interface (Gui)
Step bystep abap_field help or documentation
Abap slide class3
Ingles 2do parcial
swingbasics
Change transport system in SAP
Step bystep abap_changinga_singlerecord
Change and Transport System (CTS) in SAP
Graphical User Interface (Gui)

What's hot (20)

PPTX
Gui in java
PPT
Graphical User Interface in JAVA
PPTX
From Design to UML to Working Wireframe
PPT
Graphical User Interface (GUI) - 1
PPT
Alv theory
PDF
SAP Transport System; Step-by-step guide from concept to practical
PDF
PDF
Visualbasic tutorial
PPTX
Gui in matlab :
PPTX
GUI programming
PDF
Swingpre 150616004959-lva1-app6892
PPT
Java Swing JFC
PDF
ABAP for Beginners - www.sapdocs.info
PDF
Java GUI PART II
PPTX
Sap scripts
PDF
eMaint MX Users Guide
PPT
0105 abap programming_overview
PPT
User Exits
PPT
Message, Debugging, File Transfer and Type Group
DOC
Sample srs
Gui in java
Graphical User Interface in JAVA
From Design to UML to Working Wireframe
Graphical User Interface (GUI) - 1
Alv theory
SAP Transport System; Step-by-step guide from concept to practical
Visualbasic tutorial
Gui in matlab :
GUI programming
Swingpre 150616004959-lva1-app6892
Java Swing JFC
ABAP for Beginners - www.sapdocs.info
Java GUI PART II
Sap scripts
eMaint MX Users Guide
0105 abap programming_overview
User Exits
Message, Debugging, File Transfer and Type Group
Sample srs
Ad

Similar to Step by step abap_input help or lov (20)

PDF
Step bystep abap_fieldhelpordocumentation
PDF
Step bystep abap_changinga_singlerecord
PDF
Tech ed 2012 eim260 modeling in sap hana-exercise
PPTX
Using prime[31] to connect your unity game to azure mobile services
PPT
User exit training
PDF
Visualbasic tutorial
DOCX
Group06ctsfinal 110518191859-phpapp01
PDF
Arena tutorial
PPT
PresentationCrystalReport.ppt
PPT
PresentationCrystaljoiuouoouououoooiuiouiououoioiuoiuouo
PDF
Software engineering modeling lab lectures
DOCX
D2 k word_format
PDF
MicroStation Chapter-2 By Misson Choudhury.pdf
PPTX
COM 211 PRESENTATION.pptx
PPTX
Vb6.0 intro
PDF
Mdm255 exercise
PDF
Executing tools-in-modelbuilder-tutorial
PPT
Db2
PDF
Vb%20 tutorial
PPTX
Advance JFACE
Step bystep abap_fieldhelpordocumentation
Step bystep abap_changinga_singlerecord
Tech ed 2012 eim260 modeling in sap hana-exercise
Using prime[31] to connect your unity game to azure mobile services
User exit training
Visualbasic tutorial
Group06ctsfinal 110518191859-phpapp01
Arena tutorial
PresentationCrystalReport.ppt
PresentationCrystaljoiuouoouououoooiuiouiououoioiuoiuouo
Software engineering modeling lab lectures
D2 k word_format
MicroStation Chapter-2 By Misson Choudhury.pdf
COM 211 PRESENTATION.pptx
Vb6.0 intro
Mdm255 exercise
Executing tools-in-modelbuilder-tutorial
Db2
Vb%20 tutorial
Advance JFACE
Ad

More from Milind Patil (20)

PDF
Abap slide class4 unicode-plusfiles
PDF
Abap slides user defined data types and data
PDF
Abap slides set1
PDF
Abap slide lock Enqueue data clusters auth checks
PDF
Abap slide lockenqueuedataclustersauthchecks
PDF
Abap slide exceptionshandling
PDF
Abap reports
PPT
Lecture16 abap on line
PPT
Lecture14 abap on line
PPT
Lecture13 abap on line
PPT
Lecture12 abap on line
PPT
Lecture11 abap on line
PPT
Lecture10 abap on line
PPT
Lecture09 abap on line
PPT
Lecture08 abap on line
PPT
Lecture07 abap on line
PPT
Lecture06 abap on line
PPT
Lecture05 abap on line
PPT
Lecture04 abap on line
PPT
Lecture03 abap on line
Abap slide class4 unicode-plusfiles
Abap slides user defined data types and data
Abap slides set1
Abap slide lock Enqueue data clusters auth checks
Abap slide lockenqueuedataclustersauthchecks
Abap slide exceptionshandling
Abap reports
Lecture16 abap on line
Lecture14 abap on line
Lecture13 abap on line
Lecture12 abap on line
Lecture11 abap on line
Lecture10 abap on line
Lecture09 abap on line
Lecture08 abap on line
Lecture07 abap on line
Lecture06 abap on line
Lecture05 abap on line
Lecture04 abap on line
Lecture03 abap on line

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Cloud computing and distributed systems.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
“AI and Expert System Decision Support & Business Intelligence Systems”
MIND Revenue Release Quarter 2 2025 Press Release
Cloud computing and distributed systems.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Spectroscopy.pptx food analysis technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Big Data Technologies - Introduction.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Digital-Transformation-Roadmap-for-Companies.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Step by step abap_input help or lov

  • 1. Input Help (List of Values) Creating Input Help Prerequisites 1) Transport Request [see StepByStepCreateTransportRequestUsingSE80.pdf] 2) Package [use the package created in the first class] or create new [see StepByStep_ABAP_Create_Package.doc] 3) Copy Z027393_005A as Z027393_007A [See StepByStep_Copy_Function_Group_Program.pdf] Instead of creating from scratch we are using the program created in one of the previous class ending with ‘005A’ -- duplicating it and making changes. First copy the program and continue from here. Note: There are 5 methods to create list of values 1) Fixed Value (DOMAIN LEVEL) - Hard coded list in Data Dictionary – Using domain (of the Data Element) of the field. 2) Check Tables (FIELD LEVEL) – Specifying the Check table on the Field level. 3) Assigning the "Search Help" repository object (DATA ELEMENT LEVEL) – Create a "Search Help" Object [as an independent step] and then assign it to data element of the field. 4) Assigning the "Search Help" repository object (SCREEN ELEMENT LEVEL) – Create a "Search Help" Object [as an independent step] and then assign it to dynpro screen element in screen painter. 5) Self defined Dropdown List Boxes (SCREEN ELEMENT LEVEL) – Most flexible but requires simple SQL to populate the list – USES the PROCESS ON VALUE-REQUEST (POV) flow logic. In the following instructions, we are creating Input Help using the 4th and 5th methods. Step by Step Instructions (complete prerequisites shown above before you proceed) Launch SE80. Ensure that you are on the ‘Repository Browser’. Select Package from the drop down and enter your Package name [ZxxxxxxA] where xxxxxx is your SAP Login ID or Oracle ID, then click on the [Display] button. Your Function Group should be displayed below the package [if it was previously copied correctly to this package.] Open the Function Group Zxxxxxx_007A that was previously copied from Zxxxxxx_005A (if not already opened.) 1 of 32
  • 2. Input Help (List of Values) To display the property page, double click on the program name (node - Zxxxxxx_007A). The properties may be updated by clicking on the [Change <> Display] icon (Ctrl+F1). If any values are updated (example: the short text), ensure they are saved by clicking on the [Save] button. Now, click on the [Main program] button. 2 of 32
  • 3. Input Help (List of Values) After the main program is opened, toggle the [Change <> Display] icon (Ctrl+F1) to update the program code. Note the name of the Main Program [SAPLZ027393_007A] it will be used to create a transaction code (T-code) later. Add description on the top as shown. *&---------------------------------------------------------------------* *& Module Pool Z027393_007A *& DEMO -> Input Help (List of Values.) *&---------------------------------------------------------------------* Save the program. Activate the Function Group by clicking on the [Activate] button on the top tool bar. 3 of 32
  • 4. Input Help (List of Values) If a list of objects to be activated is provided, select all the objects (related to this program), by clicking on each of them and then click on the [Continue] button or [hit Enter] to activate them all. Before we make any changes to create the Input Help, we will confirm that the program runs fine using the T-Code. If you have not created a Transaction Code while copying the program, create it now. To create a Transaction Code (T-Code), we need the name of the Function Group Main program [SAPLZ027393_007A] and use following menu in SE80 (or by directly using T-Code SE93 – not shown here.) Enter the Transaction Code name and a short description. Leave remaining fields as default as shown below on this screen. Click [Continue] or hit [Enter]. 4 of 32
  • 5. Input Help (List of Values) Enter program name as [SAPLZ027393_007A] and the (starting) Screen number as [0100]. Save. Accept the Package and the Transport Request in the subsequent screens. 5 of 32
  • 6. Input Help (List of Values) Run the program by entering the T-code/Transaction Code [Z027393_007A] or [/nZ027393_007A], to confirm that the program runs fine. Note: /n is required if you are not currently in the SAP Easy Access screen, but in another transaction. We will use (5) Self defined Dropdown List Boxes (SCREEN ELEMENT LEVEL) – Most flexible but requires simple SQL to populate the list for these fields. 6 of 32
  • 7. Input Help (List of Values) We will use (4) Assigning the "Search Help" repository object (SCREEN ELEMENT LEVEL) – Create a "Search Help" Object [as an independent step] and then assign it to DYNPRO screen element in screen painter for this (CITYFROM) and the CITYTO Field in the next TAB. PART 1). Let us start with the Screen 0100 changes, as mentioned using (5) Self defined Dropdown List Boxes (SCREEN ELEMENT LEVEL.) Double click on the screen 0100 under the screen sub-node that is listed under the function group we are currently working on. 7 of 32
  • 8. Input Help (List of Values) Add the PROCESS ON VALUE-REQUEST (POV) Flow Logic as shown. PROCESS ON VALUE-REQUEST. FIELD ZBC400_S_HDR_CURR-CARRID MODULE create_dropdown_box1. FIELD ZBC400_S_HDR_CURR-CONNID MODULE create_dropdown_box2. Save the screen. Note that modules create_dropdown_box1 and create_dropdown_box2 do not exist yet, we will now create them using forward navigation. Double click on the module create_dropdown_box1. The following pop-up is displayed. 8 of 32
  • 9. Input Help (List of Values) Click on the ‘Yes’ button. Since this is a small application, include this new module in include file LZ027393_007AI01 (note the ‘I’ [Input] in the name.) VALUE-REQUEST (POV) modules are considered an INPUT type rather than OUTPUT types, because they are activated whenever user generates an event on the screen (click something or hit a function key). (Optional) If you are creating a new INCLUDE the following message may be displayed. Click on [Continue] button or hit Enter. 9 of 32
  • 10. Input Help (List of Values) The module is created in the INCLUDE file, add the following code (just need to add the second line – the empty module shell is already created by the system.) MODULE CREATE_DROPDOWN_BOX1 INPUT. dynpro_utilities1=>value_help1( ). ENDMODULE. " CREATE_DROPDOWN_BOX1 INPUT The code basically calls a static method value_help1 in the class dynpro_utilities1. (Note: we haven’t defined the CLASS and its STATIC METHOD yet – we will do that in a minute.) Save the INCLUDE file. Click on the Back button to go the Flow Logic of the screen 100 (or double click on the screen 0100 on the left side and then click on the Flow Logic tab.) 10 of 32
  • 11. Input Help (List of Values) Double click on the module create_dropdown_box2. The following pop-up is displayed to create the module using forward navigation. Click on ‘Yes’, the select the same include file LZ027393_007AI01 again. 11 of 32
  • 12. Input Help (List of Values) The module is created in the INCLUDE file, add the following code MODULE CREATE_DROPDOWN_BOX2 INPUT. dynpro_utilities1=>value_help2( ). ENDMODULE. " CREATE_DROPDOWN_BOX2 INPUT 12 of 32
  • 13. Input Help (List of Values) We now need to add the CLASS with the static METHODS value_help1 and value_help2. Double click on the LZ027393_007ATOP include. Add the following code (both the DEFINITION and the IMPLEMENTATION of the class) CLASS DYNPRO_UTILITIES1 DEFINITION. PUBLIC SECTION. CLASS-METHODS value_help1. CLASS-METHODS value_help2. ENDCLASS. "DYNPRO_UTILITIES1 CLASS DYNPRO_UTILITIES1 IMPLEMENTATION. METHOD value_help1. TYPES: BEGIN of carrid_line, carrid TYPE ZBC400_S_DYNCONN-carrid, 13 of 32
  • 14. Input Help (List of Values) END OF carrid_line. DATA carrid_list TYPE STANDARD TABLE OF carrid_line. SELECT distinct carrid from ZBC400_S_DYNCONN into corresponding fields of table carrid_list order by carrid. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'CARRID' value_org = 'S' TABLES value_tab = carrid_list EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3. IF sy-subrc <> 0. ENDIF. ENDMETHOD. METHOD value_help2. * TYPES: BEGIN of connid_line, * connid TYPE ZBC400_S_DYNCONN-connid, * END OF connid_line. * * DATA connid_list TYPE STANDARD TABLE OF connid_line. * SELECT distinct connid from ZBC400_S_DYNCONN into * corresponding fields of table * connid_list order by connid. TYPES: BEGIN of connid_line, connid TYPE ZBC400_S_DYNCONN-connid, CITYFROM TYPE ZBC400_S_DYNCONN-CITYFROM, END OF connid_line. DATA connid_list TYPE STANDARD TABLE OF connid_line. *SELECT distinct connid CITYFROM from ZBC400_S_DYNCONN into * corresponding fields of table connid_list order by connid. SELECT distinct connid from ZBC400_S_DYNCONN into corresponding fields of table connid_list order by connid. CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' EXPORTING retfield = 'CONNID' value_org = 'S' TABLES value_tab = connid_list EXCEPTIONS parameter_error = 1 no_values_found = 2 OTHERS = 3. IF sy-subrc <> 0. 14 of 32
  • 15. Input Help (List of Values) ENDIF. ENDMETHOD. ENDCLASS. "DYNPRO_UTILITIES1 The function 'F4IF_INT_TABLE_VALUE_REQUEST' is already defined by SAP, so does not have to be redefined. On the layout of the Screen 100 to access the field properties of ZBC400_S_HDR_CURR- CARRID field and select ‘list’ from the Dropdown property. 15 of 32
  • 16. Input Help (List of Values) Or make this change directly on the Text/I/O template Tab (of the Element list Tab) of the screen properties. 16 of 32
  • 17. Input Help (List of Values) Repeat the same for the ZBC400_S_HDR_CURR-CONNID field as shown below 17 of 32
  • 18. Input Help (List of Values) Or 18 of 32
  • 19. Input Help (List of Values) We have now created the INPUT HELP for the two fields on the screen 100. We have used the ‘Self defined Dropdown List Boxes (SCREEN ELEMENT LEVEL).’ As mentioned this is the most flexible but requires simple SQL to populate the list. Activate and run the program using the transaction id created earlier. Depending on what need to be displayed change the SQL select statement in the STATIC METHOD of the CLASS. SELECT distinct connid from ZBC400_S_DYNCONN into corresponding fields of table connid_list order by connid. Or 19 of 32
  • 20. Input Help (List of Values) SELECT distinct connid from ZBC400_S_DYNCONN into corresponding fields of table connid_list where connid < '1004' order by connid. Or add a description field to see a description in the list SELECT distinct connid CITYFROM from ZBC400_S_DYNCONN into corresponding fields of table connid_list order by connid. PART 2) Let us now work on the Screen 0200 (actually subscreens 0201 and 0202) changes, as mentioned using (4) Assigning the "Search Help" repository object (SCREEN ELEMENT LEVEL) – Create a "Search Help" Object [as an independent step] and then assign it to dynpro screen element in screen painter. We need to first create the repository object ‘Search Help’. Once created since this is a repository object any one can use it. 20 of 32
  • 21. Input Help (List of Values) Enter a new/unique Search Help name as shown below. Use a unique name – example: Zxxxxxx_SRCH where xxxxxx is your SAP Login ID or Oracle ID Click on the Enter button or hit Enter. Enter a description and click on the Selection Method search (dropdown) 21 of 32
  • 22. Input Help (List of Values) You may search for database tables or for views. 22 of 32
  • 23. Input Help (List of Values) Select ZCITY_TBL Save the search help and enter appropriate package name. Enter the appropriate workbench request. Enter the search help parameters (enter manually or click on the search for list of values for various parameters line by line.) Then select the EXP check box for both and the LPos and SPos fields as shown below. LPos is Position in the hit list of an elementary search help. SPos is Position in dialog box of an elementary search help. 23 of 32
  • 24. Input Help (List of Values) Search screen shown below for the above parameters in case you wish to select and not enter these manually. LPos 24 of 32
  • 25. Input Help (List of Values) Note: See the next screen to understand the significance of the LPos and SPos parameters. Save the search help object and activate it, by clicking on the Save button and Activate button respectively. If multiple objects are displayed to Activate, select all or all those which are relevant. The next step is to associate the search help object (Z027393_SRCH or Zxxxxxx_SRCH) to the required field ZBC400_S_HDR_CURR-CITYFROM. This field is on the screen 0201. Open the screen as shown below and double click on the CITYFROM Field to access the properties. Enter the search help object Z027393_SRCH or Zxxxxxx_SRCH into the Search Help field as shown below. 25 of 32
  • 26. Input Help (List of Values) Alternately this can also be done directly from the screen’s Reference Tab that is under the Element List tab as shown below. Save and Activate the screen. 26 of 32
  • 27. Input Help (List of Values) Repeat the same for the other field (ZBC400_S_HDR_CURR-CITYTO) that needs the Search Help of the list of values to be displayed. The field is on screen 0202 as shown below. 27 of 32
  • 28. Input Help (List of Values) Similarly this can also be done directly from the screen’s Reference Tab that is under the Element List tab as shown below. 28 of 32
  • 29. Input Help (List of Values) Save and Activate the screen. Run the program by using the Transaction Code created earlier. The search help can be accessed for Carried ID, Connection ID and for both the CITY fields as shown in the next few screenshots. 29 of 32
  • 30. Input Help (List of Values) Screen 100 Screen 200 (Tab 1) 30 of 32
  • 31. Input Help (List of Values) 31 of 32
  • 32. Input Help (List of Values) Screen 200 (Tab 2) 32 of 32