Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Search Help Addition

Former Member
0 Likes
501

Hi All,

There is a search help for material and i want the same search help to be define for the sold to party , ship to party and sales order no,for sold to party there is an elementary search help and sales order no there is no search help and how to add the search help for sold to party and how to declare for sales order no.

pls explain detailly.

Thank in advance

Hi All,

There is a search help for material and i want the same search help to be define for the sold to party , ship to party and sales order no,for sold to party there is an elementary search help and sales order no there is no search help and how to add the search help for sold to party and how to declare for sales order no.

pls explain detailly.

Thank in advance

3 REPLIES 3
Read only

Former Member
0 Likes
468

Hi,

You can refer to the following tables :

VBAK - for search help/value table for sales order/document number

VBPA - for search help/value table for sold-t-party/partners

You can use it in your program as SAP has used those in transaction VA01, VA03.

Regards,

Renjith Michael.

Edited by: Renjith Michael on Oct 23, 2008 3:30 PM

Read only

Former Member
0 Likes
468

Hi,

If you want search help in your program do like this....



here s_oa is your parameter for sales order.
AT SELECTION-SCREEN ON  VALUE-REQUEST FOR s_oa.

  IF it_oa[] IS INITIAL.
    SELECT DISTINCT vbeln
           FROM vbap
           INTO TABLE it_oa
            .
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'VBELN'
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'S_OA'
     stepl                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
*   it_sort                           = it_sort[]
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              = it_oa
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
   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.
  ENDIF.

smililarly for sold-to-party you can use table vbak (kunnr)


AT SELECTION-SCREEN ON  VALUE-REQUEST FOR s_sold. --->s_sold is your sold to party parameter.

  IF it_sold[] IS INITIAL.
        SELECT DISTINCT kunnr
           FROM vbpa
           INTO TABLE it_sold
           WHERE parvw = 'AG'.

           .
  ENDIF.

  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
*   DDIC_STRUCTURE         = ' '
      retfield               = 'KUNNR'
*   PVALKEY                = ' '
     dynpprog               = sy-repid
     dynpnr                 = sy-dynnr
     dynprofield            = 'S_SOLD'
     stepl                  = 0
*   WINDOW_TITLE           =
*   VALUE                  = ' '
   value_org              = 'S'
*   MULTIPLE_CHOICE        = ' '
*   DISPLAY                = ' '
*   CALLBACK_PROGRAM       = ' '
*   CALLBACK_FORM          = ' '
*   MARK_TAB               =
*   it_sort                           = it_sort[]
* IMPORTING
*   USER_RESET             =
    TABLES
      value_tab              = it_sold
*   FIELD_TAB              =
*   RETURN_TAB             =
*   DYNPFLD_MAPPING        =
   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.
  ENDIF.

Read only

Former Member
0 Likes
468

This message was moderated.