Skip to main content

Customized F4 Help

Function Module: F4IF_INT_TABLE_VALUE_REQUEST

  • Create types:
    • TYPESBEGIN OF ty_values,
               lot   TYPE qplos,
               batch TYPE charg_d,
               material TYPE matnr,
               date TYPE datum,
             END OF ty_values.
  • Declare internal table and work area.
    • DATAit_values      TYPE STANDARD TABLE OF ty_values WITH KEY lot,
            wa_values      TYPE ty_values.
    • DATA: it_return TYPE STANDARD TABLE OF ddshretval.
  • Create the event to request the value
    • AT SELECTION-SCREEN ON VALUE-REQUEST FOR variable. "variable = parameters/select options variable
  • Collect necessary data and populate it_values table
  • Call the function module.
    •   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        'LOT' "Internal table field
            dynpprog        sy-repid " Current program name
            dynpnr          '1000' " Screen number
            dynprofield     'P_LOT-LOW' "Parameter/Select-option field
            value_org       'S' 
            multiple_choice 'X' " If you want to choose multiple value frm f4
          TABLES
            value_tab       IT_values
            return_tab      it_return
          EXCEPTIONS
            parameter_error 1
            no_values_found 2
            OTHERS          3.

        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

        ELSE.
          READ TABLE it_return INDEX 1.
          p_lot-low it_return-fieldval.
                         ENDIF.
    • In case of select options:   
    • CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        'LOT'
            dynpprog        sy-repid
            dynpnr          '1000'
            dynprofield     'P_LOT-LOW'
            value_org       'S'
            multiple_choice 'X'
          TABLES
            value_tab       IT_values
            return_tab      it_return
          EXCEPTIONS
            parameter_error 1
            no_values_found 2
            OTHERS          3.

        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

        ELSE.
          READ TABLE it_return INDEX 1.
          p_lot-low it_return-fieldval.

          LOOP AT it_return.

            AT FIRST.
              p_lot-sign 'I'.
              p_lot-option 'EQ'.
              p_lot-low it_return-fieldval.
              APPEND p_lot.
              CLEAR p_lot.
            ENDAT.

            p_lot-sign 'I'.
            p_lot-option 'EQ'.
            p_lot-low it_return-fieldval.
            APPEND p_lot.
            CLEAR p_lot.
          ENDLOOP.
        ENDIF.

Comments

Popular posts from this blog

Adding New Input Fields to SAP Confirmations Screen (CO11N/COR6N) Without Coding

It is possible to add additional input fields in the SAP production order confirmation screen without coding. We can do this just adding fields to a structure which is included in AFRU table (Confirmation table). Process Steps Step 1:   Go to below customizing path. SIMG > Production > Shop Floor Control > Operations > Confirmation > Single Screen Entry > Define Single Screen Entry for Confirming Production Order Step 2:  Double click on the standard profile. Add "Customer Specific Fields of CI_AFRU" in the detail area. Step 3:  Go to default tab. Select an option from the "Customer Specific Fields" area. Then click on save button. Step 4:  Go to transaction code "SE11". Select database table and put "AFRU" and click on change button. Step 5:  Go to the include marked in the screenshot and double click on the data element of the include. Step 6:  Double click on "CI_AFRU". Step 7:  Click on "Yes" in the pop u...

SAP Production Order Confirmation Table List

SAP Production Order Confirmation is a process that enables companies to confirm the completion of production orders in the SAP system. The confirmation process allows companies to track and manage the progress of production orders, as well as record the actual quantities of materials used and the time taken to complete the production order. Production order confirmation tables are listed here. AFFW                     Goods Movements with Errors from Confirmation AFFWPRO           Log of deleted AFFW entries AFRC                     Incorrect cost calculations from confirmation AFRD                     Default values for collective confirmation AFRH                     Header information for confirmation pool AFRH_DEL ...

SAP Quality Management Transaction Codes

 SAP Quality Management transaction codes are listed here. Quality Management General Transaction Code List T-Codes Function Q000 Quality management QA00 Quality inspection QA01 Create Inspection Lot QA01A  Create Inspection Lot QA02 Change Inspection Lot QA02A  Change Inspection Lot QA03 Display inspection lot QA05 Job planning: Periodic inspection QA06 Job overview: Periodic inspection QA07 Trigger for recurring inspection QA07L  Deadline Monitoring Log QA08 Collective Processing of Insp. Setup QA09 No. range maintenance for insp.lots QA10 Trigger automatic usage decision QA10L  Log for Automatic Usage Decision QA11 Record usage decision QA12 Change usage decision with history QA13 Display usage decision QA14 Change UD witho...