‎2010 Mar 08 7:48 AM
Hi All,
I have to get condition record number field KNUMH=system generated unique key.
based on the following fields.
MATNR=STYLENAME
LIFNR=VENDOR NUMBER
EKORG=Default from LIFNR in Vendor Master
KSCHL=PB00
DATAB=System Date
DATBI=12.31.9999.
Please help me in finding the function module to generate the condition record number.
Thanks&Regards,
Malathi.
‎2010 Mar 08 8:03 AM
‎2010 Mar 08 9:21 AM
Hi Malathi,
For this you should know your pricing condition type. Use the following FM to get the table name for the condition type and inside the table you will all the fields mentioned with condition record KNUMH.
CALL FUNCTION 'RV_GET_CONDITION_TABLES'
EXPORTING
application = 'V' " For sales
condition_type = 'KA00'
condition_use = 'A'
get_text = 'X'
IMPORTING
table_t681 = gs_t681
table_tmc1t = gs_tmc1t
EXCEPTIONS
invalid_condition_type = 1
missing_parameter = 2
no_selection_done = 3
no_table_found = 4
table_not_valid = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
" Here gw_t681-kotab will have the table name
‎2010 Mar 08 9:25 AM