Skip to Content
avatar image
Former Member

Display a field value with Text on the side in a Custom Infotype

Hello All,

I created a custom infotype. I have a field in custom infotype, for which i created a search help.

Search help has the code and text for the field, and the code is stored in the infotype. But I need the text also to be displayed on the side, when a code is selected by the user. Could you please give me an idea, how I can do that?

For Example, if I select a personnel area code, like 0001, the text should be displayed as USA in the screen and 0001 and USA are values for two fields in search help.

Thank you,

Rush

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 02, 2008 at 03:38 AM

    Do you know ABAP? If yes, then you can do it. you need to use the screen events to capture when data is entered in the field and write a module to get the text and display in the screen. Or else you can change that field to type 'list box' so that text will be displayed automatoically.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Frank,

      Thank you for the reply. I know ABAP. Actually the infotype table has the code and the text should be displayed on the screen for that code (text field is not in the table). Just like the text for personnel area is displayed beside the personnel area code in infotype 0001.

      Is it enough if i write the code in output module and change the screen 2000 accordingly?

      Could you please suggest?

      Thanks !

      Rush

  • avatar image
    Former Member
    Sep 02, 2008 at 02:00 PM

    Here you go !

    http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbad0435c111d1829f0000e829fbfe/content.htm

    Field help on screens.
    
    REPORT DEMO_DYNPRO_F1_HELP.
    
    DATA:  TEXT(30),
           VAR(4),
           INT TYPE I,
           LINKS TYPE TABLE OF TLINE,
           FIELD3, FIELD4.
    
    TABLES DEMOF1HELP.
    
    TEXT = TEXT-001.
    
    CALL SCREEN 100.
    
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    
    MODULE F1_HELP_FIELD2 INPUT.
      INT = INT + 1.
      CASE INT.
        WHEN 1.
        VAR = '0100'.
        WHEN 2.
        VAR = '0200'.
        INT = 0.
      ENDCASE.
    ENDMODULE.
    
    MODULE F1_HELP_FIELD3 INPUT.
      CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
           EXPORTING
                DOKLANGU                      = SY-LANGU
                DOKTITLE                      = TEXT-002
                CALLED_FOR_TAB                = 'DEMOF1HELP'
                CALLED_FOR_FIELD              = 'FIELD1'.
    ENDMODULE.
    
    MODULE F1_HELP_FIELD4 INPUT.
      CALL FUNCTION 'HELP_OBJECT_SHOW'
           EXPORTING
                DOKCLASS                      = 'TX'
                DOKLANGU                      = SY-LANGU
                DOKNAME                       = 'DEMO_FOR_F1_HELP'
                DOKTITLE                      = TEXT-003
           TABLES
                LINKS                         = LINKS.
    ENDMODULE.
    
    The next screen (statically defined) for screen 100 is 100. It has the following layout:
    
    The screen fields DEMOf1HELP-FIELD1 and DEMOF1HELP-FIELD2 from the ABAP Dictionary and the program fields FIELD3 and FIELD4 are assigned to the input fields. The pushbutton has the function code CANCEL with function type E.
    
    The screen flow logic is as follows: 
    
    PROCESS BEFORE OUTPUT.
    
    PROCESS AFTER INPUT.
      MODULE CANCEL AT EXIT-COMMAND.
    
    PROCESS ON HELP-REQUEST.
      FIELD DEMOF1HELP-FIELD2 MODULE F1_HELP_FIELD2 WITH VAR.
      FIELD FIELD3 MODULE F1_HELP_FIELD3.
      FIELD FIELD4 MODULE F1_HELP_FIELD4.
    
    The components FIELD1 and FIELD2 of structure DEMOF1HELP both refer to the data element DEMOF1TYPE. This data element is documented, and also has two supplements with numbers 0100 and 0200.
    
    The following field help is displayed:
    
    When the user chooses F1 on the input field for DEMOF1HELP-FIELD1, the data element documentation for DEMOF1TYPE is displayed, since the field does not occur in the PROCESS ON HELP-REQUEST event. 
    If the user chooses F1 repeatedly for the input field DEMOF1HELP-FIELD2, the data element documentation is displayed, along with the supplement documentation for either 0100 or 0200 alternately. The variable VAR is filled in the dialog module F1_HELP_FIELD2. 
    When the user chooses F1 on the input field for FIELD3, the data element documentation for DEMOF1TYPE is displayed, since this is called in the dialog module F1_HELP_FIELD3 by the function module HELP_OBJECT_SHOW_FOR_FIELD. 
    When the user chooses F1 on the input field for FIELD4, the SAPscript documentation DEMO_FOR_F1_HELP is displayed, since this is called in the dialog module F1_HELP_FIELD4 by the function module HELP_OBJECT.
    
     
    

    ^Saquib

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      What are your search help parametersu2019? Did you created search help via SE11 . Also let me know which tables are using e.g. field name text etc

      Waiting

      ^Saquib