09-28-2010 9:37 AM
Hello,
for some material, the sales order(va02) create an order(iw32).
I would modify this order (the header text) at the creation moment .
I opened some exit when the sales order is saved, but at this time the order have number (percent)000000000001 (provisory), so if I would use a bapi to change it, I don't know the final number .
Some idea ??
tks.
R.
09-28-2010 9:57 AM
You can use the enhancement
PPCO0001
EXIT_SAPLCOBT_001
ZXCO1U01
Here you get the final order-number.
But you can't change any data. But you could use the the BAPI "BAPI_PRODORD_CHANGE" do this in background task.
regards
Joerg
09-28-2010 9:57 AM
You can use the enhancement
PPCO0001
EXIT_SAPLCOBT_001
ZXCO1U01
Here you get the final order-number.
But you can't change any data. But you could use the the BAPI "BAPI_PRODORD_CHANGE" do this in background task.
regards
Joerg
09-28-2010 3:23 PM
Hello
tks for your reply, is very very useful but not solve my problem because I have to read the standard text at item level of sales order and copy it on order.
unfortunately In you exit this text is not available.
any idea ?
09-28-2010 3:31 PM
Export the text in the sales order exit and import it back when you change the production order?
09-28-2010 3:43 PM
09-28-2010 3:49 PM
You'll find the sales order number/ pos. in the export-table "Header_table" of EXIT_SAPLCOBT_001.
(Fields: KDAUF_AUFK + KDPOS_AUFK).
SELECT single arktx FROM vbap into lv_arktx
WHERE vbeln = Header_table-KDAUF_AUFK
AND posnr = Header_table-KDPOS_AUFK.
Joerg
09-28-2010 4:21 PM
Hello Joerg,
tks for reply but I need the long text: (NOT STILL SAVED ON THE SYSTEM)
is a standard text SO10 - with
CLIENT 030
ID 0001
LANGUAGE EN
NAME HEAD+ITEM
OBJECT VBBP
TKS.
Maybe there's some place where is buffered os saved temporarly ?
tks.
09-28-2010 4:32 PM
>
> do you mean export in memory ??
>
>
> tks.
yup. something like that.
09-29-2010 7:12 AM
Ok Roberto
try this:
Do 1000 times.
CALL FUNCTION 'ENQUEUE_EVVBAKE' "Wait until Salesorder is saved"
EXPORTING
vbeln = lv_vbeln
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
CALL FUNCTION 'DEQUEUE_ALL'.
exit.
else.
WAIT UP TO 1 SECONDS.
endif.
enddo.
Then try to read the text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = ....
and save it.
CALL FUNCTION 'SAVE_TEXT'
...
if it is not working, use a Z-table, fill it with vbeln, posnr
and write a program for your requirement and plan a job with sm37.
reagrds Joerg