Skip to Content

Sale Order item Search Help

Dear Experts,

While passing the  vbap table  fields like  vbeln and posnr as selection criteria in module pool. selecting  sale  order by  f4 help , and its corresponding sale order item list   can be found in f4 help for the field  sale order item. want to adopt the same logic for custom table in module pool screen.

Tried  elementaryhelp and collective help, but no corresponding item can be found in sale order item against sale order, tried with FM F4IF_INT_TABLE_VALUE_REQUEST without pressing enter key,  values are not stored in fields(sale order ).

Regards,

Venkat.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 19, 2015 at 06:58 AM

    Hi Ramesh,

    Try writing the below code in the event Process on value request

    process ON VALUE-REQUEST.FIELD P_VBELN MODULE F4HELP.

    Module F4HELP.

       dynfields-fieldname = 'P_VBELN'.

       APPEND dynfields.

       CALL FUNCTION 'DYNP_VALUES_READ'

         EXPORTING

           dyname               = sy-cprog

           dynumb               = sy-dynnr

           translate_to_upper   = 'X'

         TABLES

           dynpfields           = dynfields

         EXCEPTIONS

           invalid_abapworkarea = 1

           invalid_dynprofield  = 2

           invalid_dynproname   = 3

           invalid_dynpronummer = 4

           invalid_request      = 5

           no_fielddescription  = 6

           invalid_parameter    = 7

           undefind_error       = 8

           double_conversion    = 9

           stepl_not_found      = 10

           OTHERS               = 11.

       READ TABLE dynfields WITH KEY fieldname = 'P_VBELN'.

       p_vbeln = dynfields-fieldvalue.

       CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

         EXPORTING

           input  = p_vbeln

         IMPORTING

           output = p_vbeln.

       SELECT posnr matnr arktx INTO TABLE gt_help

                      FROM vbap

                           WHERE vbeln = p_vbeln.

         IF sy-subrc = 0 .

       CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

         EXPORTING

           retfield    = 'POSNR'

           dynprofield = 'P_POSNR'

           dynpprog    = sy-cprog

           dynpnr      = sy-dynnr

           value_org   = 'S'

         TABLES

           value_tab   = gt_help.

       ENDIF.

    ENDMODULE.

    Add comment
    10|10000 characters needed characters exceeded