2007 Mar 02 1:25 PM
Hi all,
i am try to update few fields in Va02 .. during recording when i enter the VBELn value .. i get a information screen " Consider subsequent Documents" well this is not recoerded . the problem is when i run this program in ALL Screen Mode it works as i press enter however when i run in No Screen Mode this screen is not handled and so it does not update .
Please help.
2007 Mar 02 1:27 PM
Hi all,
i am try to update few fields in Va02 .. during recording when i enter the VBELn value .. i get a information screen " Consider subsequent Documents" well this is not recoerded . the problem is when i run this program in ALL Screen Mode it works as i press enter however when i run in No Screen Mode this screen is not handled and so it does not update .
Please help.
2007 Mar 02 1:27 PM
2007 Mar 02 1:39 PM
Hi Rich,
Thanks for ur suggestion however i have to use BDC for VA02. Bapi would have been lot more easy for me . can u help me here . coz every time i do the recording it gives the ionformation and its not handled at runtime
regards
Arnab
2007 Mar 02 1:52 PM
This is an information message and it is skipped(along with warning messages). You either have coded the ENTER in your BDC which is not needed to skip the message or there is something else which is making your BDC fail. For example, here is a recording of VA02, I'm just enter the VBELN and hitting enter to go to the next screen. This sales document actually showed the "consider subsuquent documents" message and it skips the message just fine.
* Enter VBELN and hit enter
perform bdc_dynpro using 'SAPMV45A' '0102'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-VBELN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBAK-VBELN'
'12345'.
* Now just back out.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'/EBAC1'.
perform bdc_transaction using 'VA02'.
Regards,
Rich Heilman
2007 Mar 02 1:31 PM
Hi Arnah,
i think it's better to use BAPI_SALESORDER_CHANGE
Here a short example:
DATA: SALESDOCUMENT LIKE BAPIVBELN-VBELN.
DATA: ORDER_HEADER_INX LIKE BAPISDH1X.
*
DATA: RETURN TYPE TABLE OF BAPIRET2 WITH HEADER LINE.
DATA: RETURN1 TYPE TABLE OF BAPIRET2 WITH HEADER LINE.
DATA: ORDER_ITEM_IN TYPE TABLE OF BAPISDITM WITH HEADER LINE.
DATA: ORDER_ITEM_INX TYPE TABLE OF BAPISDITMX WITH HEADER LINE.
*
ORDER_HEADER_INX-UPDATEFLAG = 'U'.
*
ORDER_ITEM_IN-ITM_NUMBER = '000010'.
ORDER_ITEM_IN-REASON_REJ = '01'.
APPEND ORDER_ITEM_IN.
*
ORDER_ITEM_INX-ITM_NUMBER = '000010'.
ORDER_ITEM_INX-UPDATEFLAG = 'U'.
ORDER_ITEM_INX-REASON_REJ = 'X'.
APPEND ORDER_ITEM_INX.
*
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = '0000001000'
ORDER_HEADER_INX = ORDER_HEADER_INX
SIMULATION = 'X'
TABLES
RETURN = RETURN
ORDER_ITEM_IN = ORDER_ITEM_IN
ORDER_ITEM_INX = ORDER_ITEM_INX.
*
LOOP AT RETURN.
WRITE: / RETURN-TYPE, RETURN-ID, RETURN-NUMBER, RETURN-MESSAGE(50).
ENDLOOP.
*
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN1.
*
LOOP AT RETURN1.
WRITE: / RETURN1-TYPE, RETURN1-ID, RETURN1-NUMBER, RETURN1-MESSAGE(50).
ENDLOOP.
Regards, Dieter
2007 Mar 02 1:34 PM
Hello,
U can make use of the BAPI_SALESORDER_CHANGE to updatea field in VA02.
Kindly check the following code:
lt_schdl -ITM_NUMBER= '000030'.
lt_schdl -SCHED_LINE = '0001'.
lt_schdl -REQ_QTY = '0000000000001'.
APPEND lt_schdl .
lt_schdlx-ITM_NUMBER = '000030'.
lt_schdlx-UPDATEFLAG = 'U'. " Try 'I' while inserting
lt_schdlx-SCHED_LINE = 'X'.
lt_schdlx-REQ_QTY = 'X'.
APPEND lt_schdlx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = '2500000217'
* ORDER_HEADER_IN =
order_header_inx = i_order_header_inx
* SIMULATION =
behave_when_error = ' '
int_number_assignment = ' '
* LOGIC_SWITCH =
no_status_buf_init = ' '
TABLES
return = i_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx
<b>SCHEDULE_LINES = lt_schdl
SCHEDULE_LINESX = lt_schdlx.</b>
Hope this is helpful!.
Vasanth
2007 Mar 02 2:09 PM