2008 Mar 27 11:49 AM
Hi all,
Please help me
Here is sample coding
data :
l1 type /AFS/BAPISDHDX,
lr type standard table of BAPIRET2 with header line,
lc type standard table of /AFS/BAPICOND with header line,
lx type standard table of /AFS/BAPICONDX with header line.
lc-itm_number = 000010.
lc-cond_type = 'ZDHD'.
lc-cond_value = '20'.
APPEND lc.
clear lc.
lx-itm_number = 000010.
lx-cond_type = 'ZDHD'.
lx-updateflag = 'U'.
lx-cond_value = 'X'.
APPEND lx.
CLEAR lx.
l1-UPDATEFLAG = 'U'.
CALL FUNCTION '/AFS/BAPI_SALESORD_CHANGE'
EXPORTING
SALESDOCUMENT = '0100865469'.
ORDER_HEADER_INX = l1
TABLES
RETURN = lr
CONDITIONS_IN = lc
CONDITIONS_INX = lx
.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
endif.
This /AFS/BAPI_SALESORD_CHANGE' is same as BAPI_SALESORDER_CHANGE..
See above I am giving itm_number = 000010.
Now it is adding a new Condition 'ZDHD' and rate as specified to given sales order..
Now If i change the rate to '4.00' and run the above program then the current Condition ZDHD is modified with new rate '4.00' from '10.00'.
[ But I want to add this ZDHD at header level
go to VA03 > sales order no> goto> header> conditions
you can see the condition type and rate.]
At header level
i.e
lc-itm_number = 000000.
lc-cond_type = 'ZDHD'.
lc-cond_value = '20'.
APPEND lc.
clear lc.
lx-itm_number = 000000.
lx-cond_type = 'ZDHD'.
lx-updateflag = 'U'.
lx-cond_value = 'X'.
APPEND lx.
CLEAR lx.
at this coding change in program itm_number = 000000 instead of 000010.
The value of rate is not modified but a new line is appended when I look into va03 for the sales order.
PLease let me know how to modify the RATE value to '4.00' from '10.00' for condition type ZDHD at header level..
rewards will be for sure for the correct solution
regards,
nazeeer
Edited by: N a z e e r on Jan 15, 2009 3:36 PM
Hi all,
Please help me
Here is sample coding
data :
l1 type /AFS/BAPISDHDX,
lr type standard table of BAPIRET2 with header line,
lc type standard table of /AFS/BAPICOND with header line,
lx type standard table of /AFS/BAPICONDX with header line.
lc-itm_number = 000010.
lc-cond_type = 'ZDHD'.
lc-cond_value = '20'.
APPEND lc.
clear lc.
lx-itm_number = 000010.
lx-cond_type = 'ZDHD'.
lx-updateflag = 'U'.
lx-cond_value = 'X'.
APPEND lx.
CLEAR lx.
l1-UPDATEFLAG = 'U'.
CALL FUNCTION '/AFS/BAPI_SALESORD_CHANGE'
EXPORTING
SALESDOCUMENT = '0100865469'.
ORDER_HEADER_INX = l1
TABLES
RETURN = lr
CONDITIONS_IN = lc
CONDITIONS_INX = lx
.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
endif.
This /AFS/BAPI_SALESORD_CHANGE' is same as BAPI_SALESORDER_CHANGE..
See above I am giving itm_number = 000010.
Now it is adding a new Condition 'ZDHD' and rate as specified to given sales order..
Now If i change the rate to '4.00' and run the above program then the current Condition ZDHD is modified with new rate '4.00' from '10.00'.
[ But I want to add this ZDHD at header level
go to VA03 > sales order no> goto> header> conditions
you can see the condition type and rate.]
At header level
i.e
lc-itm_number = 000000.
lc-cond_type = 'ZDHD'.
lc-cond_value = '20'.
APPEND lc.
clear lc.
lx-itm_number = 000000.
lx-cond_type = 'ZDHD'.
lx-updateflag = 'U'.
lx-cond_value = 'X'.
APPEND lx.
CLEAR lx.
at this coding change in program itm_number = 000000 instead of 000010.
The value of rate is not modified but a new line is appended when I look into va03 for the sales order.
PLease let me know how to modify the RATE value to '4.00' from '10.00' for condition type ZDHD at header level..
rewards will be for sure for the correct solution
regards,
nazeeer
Edited by: N a z e e r on Jan 15, 2009 3:36 PM
2009 Jan 15 10:07 AM
2012 Jun 26 6:44 PM
what about the solution? share your solutions too, not only your problems.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |