‎2016 Apr 01 7:48 AM
Hi All,
I have created sub screen in standard transactions in one of the custom tab that we created. We created this tab next to additional tab B in order related transactions.
I have added few fields in the subscreen. The problem am facing here as soon i enter the value in the field and press enter the values are getting cleared.
When i try to save directly without pressing enter, system is saving the value in database but if i press enter again in the transaction the values are cleared.
I dont use any clear system in my code to effect this scenario.
Requesting your guidance on the same.
Regards
‎2016 Apr 01 9:17 AM
Did you use some TABLES statement on some structures or tables in global area (top include) to insure communication between program (variables) and dynpro (screen fields)?
Regards,
Raymond
‎2016 Apr 01 8:12 AM
Hi Saranya,
Please check the below
Thanks
Siva.A
‎2016 Apr 01 8:45 AM
Hi Siva Subramanian,
Am using two fields from data dictionary and two fields i created.
Can you please help me on your second point, defining screen name. Can you help me with the syntax.
‎2016 Apr 01 9:17 AM
Did you use some TABLES statement on some structures or tables in global area (top include) to insure communication between program (variables) and dynpro (screen fields)?
Regards,
Raymond
‎2016 Apr 01 11:46 AM
Hi,
For fields that are not part of table fields, these fields i have created in screen using CHAR data type.
What changes should i do for these cases.
Regards
‎2016 Apr 01 10:40 AM
Hi Saranya,
Declare the input fields name in the global data of the program. Use the same as the field name for automatic data transfer from screen to program so that the data is available in the program after transfer of data from screen. Use tables statement for dictionary elements and data for other fields with same name as of the screen fields.
‎2016 Apr 01 12:24 PM
Thanks Pras Venkat Raymond Giuseppi,
i have one scenario,
i have declared a field name as <G_EXP-YYADJTAT>, the same field i have used it my program and declared the same field in Top Include as field.
What should i do in this case to avoid clearing of the field after i press enter. Does the field symbol declaration is sufficient?
Please help me on this.
Let me try your suggestions and get back to you on the same.
‎2016 Apr 01 12:25 PM
In your Screen painter under program tab do not forget to check the output field check box.
please check this first before you proceed with the solutions suggested by experts above.
‎2016 Apr 01 12:33 PM
Thanks Pras Venkat Raymond Giuseppi,Satish Kumar Balasubramanian
With all your inputs am able to clear the issue for the all fields except the fields which i declared as a field symbol in the program and declared the same name in the screen as mentioned above.
Requesting your help and guidance for this one final field.
Regards
‎2016 Apr 01 1:16 PM
I'm not sure Abap is able to map screen fields to field symbols subscreen (never tried, what if not assigned?). In any case it should not be able to do this for ddic reference field as they require a TABLES statement (*) Using some FIELD ... MODULE won't satisfy your requirement...
Regards,
Raymond
(*) Ref: dynpro fields
‎2016 Apr 01 9:40 PM
If the field symbol is not assigned, that would short dump GETWA_NOT_ASSIGNED exactly as for normal ABAP (I didn't know, so I tried it ).
I advise adding a watchpoint to the data object to which the field symbol is assigned, to identify when it's cleared out.
‎2016 Apr 04 3:02 PM
If that the field symbol is populated in a BAdI ... then it is possible that on each PBO a new instance of the real data field is created in this BAdI, then it would look like the field gets cleared. And in this case you would never see a GETWA_NOT_ASSIGNED
‎2016 Apr 01 12:47 PM
Hi,
did u try debugging it.? when ever u press enter it goes through a certain flow like PAI -> PBO -> PBO. Try debugging and then check the flow, also monitor the values of the field which u have declared.
One cause i can think is that there runs a select query for the fields to get output , whenever you are pressing enter that flow is getting triggered and hence there is no value in DB , its getting cleared. Can be other cause too. Do one thing put value on screen fields give '/h' in command field and press enter and then continue with debugging.
‎2016 Apr 01 1:00 PM
Hi Ashish,
There is no select query, i know that i need to declare the field using DATA keyword but in this case am declaring it as field symbol only then i can meet requirement.
There is some trick that needs to be followed when we are using the field symbol to avoid this auto clearing. Am just clueless on the same.
Requesting the guidance of the experts.
‎2016 Apr 01 1:04 PM
‎2016 Apr 01 1:14 PM
Hi,
cross check that you are not clearing your field symbols not in PBO and PAI of the screen.
For the screen fields, it does not matter whether you declare it as data or with field symbol,
the point is the name and data types should be same for the screen fields name as well as the program fields name.
Playing with the field symbols needs a bit of cautiousness because it plays with the memory and must be assigned before its used
Could you tell us how you are adding the extra tab .i.e. using BADI OR customer Exit?
If Customer Exit then try to use Memory ID (Import and Export).
Regards,
Syed
‎2016 Apr 01 1:14 PM
there is no explicit code here. i have declared the fields symbols here as below,
FIELD-SYMBOLS:<g_exp-yyadjtat> TYPE vbak-yyfield.
I have used the same field name <g_exp-yyadjtat> in the screen painter.
In later stage in one of the include am assigning some value to this field symbol.
I get the data getting stored in table successfully but on pressing enter the values are geting cleared.
Please help.
‎2016 Apr 01 1:47 PM
Hi, I think you simply forgot to assign a real field to your field-symbol ....