‎2007 Mar 13 5:50 PM
When Sales Order is created, using output determination I will be triggering a program. I need to write the program to fill in the Customer number, sales document number, date, time and set flag as blank into a table ZTABLE
Can anyone help me with the syntax
‎2007 Mar 13 5:53 PM
‎2007 Mar 13 5:53 PM
‎2007 Mar 13 5:58 PM
Hi,
check for userexit on saving sales order.
MV45AFZZ.u can use USEREXIT_SAVE_DOCUMENT,USEREXIT_SAVE_DOCUMENT_PREPARE
write your code in this exit to update the Z table.
aRs
‎2007 Mar 13 6:00 PM
Hi,
You can also use update statement.
update ztable
set kunnr = wa_kunnr
vbeln = wa_vbeln
datum = sy-datum
uzeit = sy-uzeit
flag = space
where <condition>.
Regards,
Ferry Lianto
‎2007 Mar 13 6:02 PM
So I have ZTABLE (KUNNR, VBELN, ERDAT,ERZET,FLAG)
Do I simply create a report?
REPORT ZREPORT.
TABLES: ZTABLE
KUNNR=VBAK-KUNNR.
VBELN=VBAK-VBELN.
ERDAT=NAST-ERDAT.
ERZET=NAST-ERUHR.
FLAG=SPACE.
INSERT ZTABLE.
‎2007 Mar 13 6:04 PM
Hi,
In the userexit USEREXIT_SAVE_DOCUMENT in the include MV45AFZZ..Create an include..
IN the include have the following code..
tables: ztable.
ztable-kunrr = vbak-kunnr.
ztable-vbeln = vbak-vbeln.
ztable-datum = sy-datum.
ztable-uzeit = sy-uzeit.
ztable-flag = space.
MODIFY ztable.
Thanks,
Naren
‎2007 Mar 13 6:05 PM
you can also use
DATA: wa TYPE ztable.
wa-id = '12400177'.
wa-name = 'Robinson'.
wa-postcode = '69542'.
wa-city = 'Heidelberg'.
wa-custtype = 'P'.
wa-discount = '003'.
wa-telephone = '06201/44889'.
MODIFY ztable FROM wa.
Inserts a new line or updates an existing line in a database table.
aRs