2023 Sep 01 7:53 AM
I have created a custom field ZINVRDAT on screen exit with character data type.
I can see the PBO function exit EXIT_SAPLMLSR_020 as a part fo screen exit for ML81N tcodel .both pbo and pai evets are getting triggered upon executing of ML81N.
I want to capture then system date field (SY-DATUM) and it should be default value .
In the include ZXMLUU27, i have used the code as
CI_ESSRDB-ZINVRDAT = sy-datum.
ZINVRDAT is char10 datatype added using CI_ESSRDB to ESSR Table
WHEN i run the ML81N t code I can see the added field as empty.
I can observer that the PAI is working fine, what ever the value is on the screen it is getting updated on db table ESSR
Kindly please help me at the earliest.
image.png2023 Sep 01 9:00 AM
You should define ZINVRDAT as DATS type (8 characters YYYYMMDD), not char10.
In your custom subscreen, you define the screen field ESSR-ZINVRDAT (DATS), it will automatically be displayed in char10 user format (e.g. MM.DD.YYYY).
In your PBO module or exit, you must initialize:
ESSR-ZINVRDAT = I_ESSR-ZINVRDAT.
2023 Sep 01 10:08 AM
Hi, Rossi, Thanks for you quick response.
I have just renamed the screen variable from ZINVRDAT to ZINVDAT.
I have also made changes in se51.
ESSR-ZINVDAT = I_ESSR-ZINVDAT
I am using this in my pbo module. The issue I am facing here now is as shown in the image. The field "ESSR" is unknown. However, to remove this error I am declaring the name of table ESSR in line 4 of the image.
Then it is throwing another error. ESSR is already declared.
Please consider line 4 and 17 as rest everything is commented in above image.
We are getting errors in 2 different includes.
Please help me fix this issue. Thanks.
2023 Sep 01 6:30 PM
General information about Dynpro (not specific to your question): if you define a screen field named XX or XX-COMP, you must declare a global variable in your program named XX, it's the way to transfer values, otherwise it will NEVER work (except using tweaks).
2023 Sep 02 2:36 PM
Thanks for sharing valueable information. If I have to reward some one , other than clicking on "ACCEPT" and "LIKE" , is there any other way that I can reward so that it gives others kind of motivation ?
2023 Sep 02 4:10 PM
No official way from SAP, AFAIK.
In my case, just one feedback with "useful" information (not noise, something which clarifies, which helps understand why something is wrong/right/didn't understand, etc., or which is targeted to help future visitors) is what motivates me 😉
It can even be posted as a blog post (if it doesn't repeat something already said by another blog post).
2023 Sep 01 10:35 AM
Put the TABLES statement in the top include as explained in the previous post