07-08-2014 10:26 AM
Hi Team ABAP,
I need to determine the fields on a selscreen at runtime.
That means FM´s like DYNPRO_FIELD_GET, are not doing the i need.
If a field is made inactive or invisible in PBO (at selection Screen Output) i dont Need/want this in my Analysis.
Maybe i better state what i want to achieve.
I want to rightclick a selscreen-field, and then use the upcoming context menue to make it dissappear.
For that i added a pf-status to that selscreen.
In sy-curow i get which row the user clicked on (for example take 5), so now i need to find out which selscreen field is displayed in row 5.
So i can create the customizing entry for this field.
Maybe someone has an idea for me, i dont need coding, i can do that myself.
Thanks for reading
regards
Florian Kemmer
07-08-2014 11:09 AM
Hi Florian,
I try to help you.
I think SAP could do this, because when you press F1, SAP know which field name you have selected.
The only things I have found, is the call of a kernel function : 'HELP_GET_FIELDS'
But I don't know if you could reuse it
good luck
Fred
07-08-2014 11:09 AM
Hi Florian,
I try to help you.
I think SAP could do this, because when you press F1, SAP know which field name you have selected.
The only things I have found, is the call of a kernel function : 'HELP_GET_FIELDS'
But I don't know if you could reuse it
good luck
Fred
07-08-2014 11:45 AM
Hey Fred thanks a lot.
unfortunateley we dont have this FM on our System, only HELP_GET_VALUES.
But you brought me on the right track.
I am right now Debugging what is happening when you press F1 on a selscreen-field.
Somehow they need to determine on which i have clicked as well, so there definiteley IS a solution, lets see if i can find it out, i will repost if so.
07-08-2014 12:33 PM
it's not a Function Module
it's a kernel function CALL '...'
regards
Fred
07-08-2014 12:39 PM
Well Anyway, it took me a Little but i figured it out.
following code does the trick for me:
[code]
Tables phelp.
IMPORT phelp FROM MEMORY ID 'PHELP'. [/code]
i do this in the Event AT_SELECTION_SCREEN OUTPUT.
Then in phelp-dynprofld i have the actual field i clicked on.
And even if i totally misunderstood you you helped me a lot focusing my thoughts on the right way.
Before your answer i didnt think about that while pressing F1 it works and i only have to find out how they do it.
07-08-2014 12:54 PM
Maybe the data is populated with SAPMSYS (something like that), The code is protect and maybe SAP prefer to make an export of the result ..
Fred
07-08-2014 12:47 PM
May be silly, but did you try GET CURSOR, should be available, after all a context menu trigger a PAI no ?
Regards,
Raymond
07-08-2014 12:53 PM
Well Raymond, thats not silly, as that was my first shot
Problem is that the Information it gets me doesnt help me.
I get the Information that i am on the 4th field for example.
But when i have deactivated a field in the selscreen pbo the index doesnt reflect that.
For example when i have 5 fields on selscreen, the third deactivated so it doesnt Show up, and then do a rightclick on the third displayed field i get back index 3. But 3 is the field i actually deactivated, so without additionally reading my deactivation customizing i have no Chance to find out on which field i actually clicked.
07-08-2014 1:11 PM
And executing a LOOP AT SCREEN after the GET CURSOR, the screen attributes are not yet reset to dynpro definition values (that will happen just before PBO/AT SELECTION-SCREEN OUTPUT) so a LOOP AT SCREEN til N active fields read (SCREEN-ACTIVE) ?
Else did you find the MEMORY ID in SAPMSHLP ?
Regards,
Raymond
07-08-2014 3:14 PM
Exactly in SAPMSHLP in the module
SAPHLP_PBO OUTPUT
There i found the Export of that Memory ID, tried it an Import in my program and it worked.