01-07-2015 12:29 PM
Hi All,
I have a Z table in which I have added some events in its TMG.
My problem is the table is not getting updated while I change any record.
The event number is 18.
Please help.
01-08-2015 10:50 AM
Hi all,
It is done.
Solution is as below.
In the Event 02 the code is written.
DATA: W_ZDCC_REMARK TYPE ZDCC_REMARK. " DCC Document Reason for Remark
FIELD-SYMBOLS: <FS1> TYPE ANY,
<FS2> TYPE ANY,
<FS3> TYPE ANY.
CLEAR W_ZDCC_REMARK.
ASSIGN ('<VIM_EXTRACT_STRUC>-REMARK') TO <FS1>.
IF <FS1> IS ASSIGNED.
SELECT SINGLE * FROM ZDCC_REMARK INTO W_ZDCC_REMARK
WHERE REMARK = <FS1>.
IF sy-subrc = 0.
W_ZDCC_REMARK-ZUNAME = SY-UNAME.
W_ZDCC_REMARK-ZERSDA = SY-DATUM.
W_ZDCC_REMARK-ZUZEIT = SY-UZEIT.
MODIFY ZDCC_REMARK FROM W_ZDCC_REMARK.
ENDIF.
ENDIF. " IF <FS1> IS ASSIGNED
One additional thing is also needed for the same.
We have to configure the table in transaction SCDO.
This will solve the purpose.
01-07-2015 1:00 PM
Hi Yash,
After creating event number 18, Create another event 02 for "after save".
It will save the changes.
Best Regards,
Somya
01-07-2015 1:08 PM
01-07-2015 2:36 PM
You're going to have to share your code if you really want some help.
Rob
01-07-2015 3:30 PM
Hi Yash,
Are you updating the Table primary key via TMG. Normally during change, when we are updating the Table primary key for the particular record in that time only the TMG won't work. Kindly confirm the same.
If you still face the problem, kindly share the code written in event and table screenshot too...
Regards
Rajkumar Narasimman
01-08-2015 4:22 AM
No I am not updating the primary key..
ZDCC_REMARK-ZUNAME = sy-uname.
ZDCC_REMARK-ZERSDA = SY-DATUM.
ZDCC_REMARK-ZUZEIT = Sy-UZEIT.
modify ZDCC_REMARK.
This is my code. And the event is 2.
01-08-2015 5:30 AM
Hi Yash,
No need to use this line modify ZDCC_REMARK.
Please just write your front 3 lines code in event 24 or event 05.(I forget which 1 detailly.)
Regards
Feiyun
01-08-2015 5:46 AM
Hi Feiyun
Event 5 is for new entry. I have written the create entry code. It is working perfect.
I need an event which updates the change.
01-08-2015 6:27 AM
Hi Yash,
Can you try using event AB.
AB | Instead of the standard database change routine |
Thanks,
Greeshma.
01-08-2015 6:42 AM
01-08-2015 6:55 AM
Hi Yash,
you want to change table through events only?
did you try the below code?
Instead of doing it through event . you can achieve this through writing
code in overview sceen number PAI.
TRY below code.
IN PAI
FIELD ZDCC_REMARK-ZUNAME module custom_pai.
FIELD ZDCC_REMARK-ZERSDA module custom_pai.
FIELD ZDCC_REMARK-ZUZEITmodule custom_pai.
MODULE custom_pai input.
ZDCC_REMARK-ZUNAME = sy-uname.
ZDCC_REMARK-ZERSDA = SY-DATUM.
ZDCC_REMARK-ZUZEIT = Sy-UZEIT.
ENDMODULE.
01-08-2015 7:07 AM
Yes I want to change through events.
There are so many includes. Which one is to be used?
01-08-2015 7:11 AM
Hi..
Marimuthu Kaliyaraj wrote:
Hi Yash,
you want to change table through events only?
did you try the below code?
Instead of doing it through event . you can achieve this through writing
We have some problem in defining the code in the screen Flow logic(PAI/PBO) for few cases.
If TMG is recreated, in those case, we are suppose to do the change in the flow logic again.
The Maintenance cost comes into matter at the EOD.
So it is required to use Events instead of writing the code in Flow logic.
If I am wrong, kindly correct me..
Regards
Rajkumar Narasimman
01-08-2015 7:55 AM
01-08-2015 6:12 AM
Hi Yash,
Instead of doing it through event . you can achieve this through writing
code in overview sceen number PAI.
TRY below code.
IN PAI
FIELD ZDCC_REMARK-ZUNAME module custom_pai.
FIELD ZDCC_REMARK-ZERSDA module custom_pai.
FIELD ZDCC_REMARK-ZUZEITmodule custom_pai.
MODULE custom_pai input.
ZDCC_REMARK-ZUNAME = sy-uname.
ZDCC_REMARK-ZERSDA = SY-DATUM.
ZDCC_REMARK-ZUZEIT = Sy-UZEIT.
ENDMODULE.
Thanks,
Marimuthu.K
01-08-2015 10:50 AM
Hi all,
It is done.
Solution is as below.
In the Event 02 the code is written.
DATA: W_ZDCC_REMARK TYPE ZDCC_REMARK. " DCC Document Reason for Remark
FIELD-SYMBOLS: <FS1> TYPE ANY,
<FS2> TYPE ANY,
<FS3> TYPE ANY.
CLEAR W_ZDCC_REMARK.
ASSIGN ('<VIM_EXTRACT_STRUC>-REMARK') TO <FS1>.
IF <FS1> IS ASSIGNED.
SELECT SINGLE * FROM ZDCC_REMARK INTO W_ZDCC_REMARK
WHERE REMARK = <FS1>.
IF sy-subrc = 0.
W_ZDCC_REMARK-ZUNAME = SY-UNAME.
W_ZDCC_REMARK-ZERSDA = SY-DATUM.
W_ZDCC_REMARK-ZUZEIT = SY-UZEIT.
MODIFY ZDCC_REMARK FROM W_ZDCC_REMARK.
ENDIF.
ENDIF. " IF <FS1> IS ASSIGNED
One additional thing is also needed for the same.
We have to configure the table in transaction SCDO.
This will solve the purpose.