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

Function module to generate condition record number

Former Member
0 Likes
1,352

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.

3 REPLIES 3
Read only

Former Member
0 Likes
789

Chk the bapi, BAPI_PRICES_CONDITIONS

sample pgms.

Regards,

Anish

Read only

former_member1292715
Participant
0 Likes
789

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

Read only

Former Member
0 Likes
789

Hi,

Check the below bapi.

'BAPI_PRICES_CONDITIONS'

for more [Click Here|;

Regards

Nehruu