2008 Oct 23 10:48 AM
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
2008 Oct 23 10:59 AM
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
2008 Oct 23 11:02 AM
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.
2008 Nov 04 11:50 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |