Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

PBO function module of screen exit is getting triggered but values are not capturing on screen

pashasapcha
Participant
0 Kudos
919

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.png
6 REPLIES 6

Sandra_Rossi
Active Contributor
0 Kudos
858

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.

0 Kudos
858

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.

858

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).

0 Kudos
858

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 ?

0 Kudos
858

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).

raymond_giuseppi
Active Contributor
0 Kudos
858

Put the TABLES statement in the top include as explained in the previous post