Skip to Content
author's profile photo Former Member
Former Member

Bapi_prices_conditions

Hi all,

I am using the condition table A911 and KON P ...for creating condition records ...i use transaction vk11.

Now i want to try creating condition records using bapi_prices_conditions..which will reflect in these two tables.

i referecd all the forums in sdn ...but nothing is helping me ...

i dont know where i am going wrong...i think the problemis with the inputs..

i tried with the code which everyone propesd in sdn for other forums .....i am not getting any success or error message .pls help in solving the problem.points wil be rewarded

wtable1-table_no = '911'.

wtable1-applicatio = 'V'.

wtable1-cond_type = 'ZTUP'.

wtable1-operation = '009'.

wtable1-varkey = '8380AATEST7'.

wtable1-valid_to = '99991231'.

wtable1-valid_from = '20080108'.

*wtable1-cond_no = '$000000001'.

APPEND wtable1 TO table1.

wtable2-operation = '009'.

*wtable2-cond_no = '$000000001'.

wtable2-created_by = sy-uname.

wtable2-creat_date = '20080108'.

wtable2-cond_usage = 'A'.

wtable2-table_no = '911'.

wtable2-applicatio = 'V'.

wtable2-cond_type = 'ZTUP'.

wtable2-varkey = '8380AATEST7'.

wtable2-valid_from = '20080108'.

wtable2-valid_to = '99991231'.

APPEND wtable2 TO table2.

wtable3-operation = '009'.

*wtable3-cond_no = '$000000001'.

wtable3-cond_count = '01'.

wtable3-applicatio = 'V'.

wtable3-cond_type = 'ZTUP'.

wtable3-scaletype = 'A'.

wtable3-scalebasin = 'C'.

wtable3-scale_qty = '1'.

wtable3-cond_p_unt = '1'.

wtable3-cond_unit = 'EA'.

wtable3-calctypcon = 'C'.

wtable3-cond_value = '454'.

wtable3-condcurr = 'USD'.

APPEND wtable3 TO table3.

CALL FUNCTION 'BAPI_PRICES_CONDITIONS'

EXPORTING

PI_initialmode = 'X'

  • PI_BLOCKNUMBER =

TABLES

ti_bapicondct = table1

ti_bapicondhd = table2

ti_bapicondit = table3

ti_bapicondqs = table4

ti_bapicondvs = table5

to_bapiret2 = table6

to_bapiknumhs = table7

to_mem_initial = table8

EXCEPTIONS

update_error = 1

OTHERS = 2

.

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 TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.

IF sy-subrc = 0.

loop at table6 into wtable6.

write: / wtable6-type, wtable6-message, wtable6-id, wtable6-LOG_NO,

wtable6-LOG_MSG_NO,

wtable6-MESSAGE_V1, wtable6-MESSAGE_V2,wtable6-MESSAGE_V3,

wtable6-MESSAGE_V4,

wtable6-PARAMETER,wtable6-ROW,wtable6-FIELD.

endloop.

ELSE.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

**EXPORTING

  • WAIT =

*IMPORTING

*return = ret

.

write : 'success'.

ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 09:27 AM

    Hi,

    Try using Direct Input Program RV14BTCI for creating, changing and deleting price conditions. This is very easy way.

    Check this thread also

    sample-code-for-bapipricesconditions

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 09:40 AM

    Hai,

    Please check the following links:

    [sample-code-for-bapipricesconditions;

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi all,

      Please donr give the same thread which i have already used..pls understand my problem correctly .i have used the same code in the thread which u have mentioned.that is not helpin me..

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.