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: 

Unable to read drop down value in sub screen

0 Kudos

I am facing same issue. unable to read drop down selected value.. please tell me way to read the value

11 REPLIES 11

raymond_giuseppi
Active Contributor
0 Kudos

What do you mean by 'read drop down selected value' did you write a FIELD statement in the PAI of the subscreen, did you define the field in a structure in main program (some TABLES statement)

former_member185414
Active Contributor
0 Kudos

Sort of hack and non conventionally recommened way is to read screen elements via Field Symbols

Eg :

FIELD-SYMBOLS: <fs_fund_code_value> TYPE tt_aitem_fields,

ASSIGN ('(SAPLAMVT_TAX_CLASS_CODE)MT_EXTDATA_ITEM') TO <fs_fund_code_value>.

Here - tt_aitem_fields is a table type, SAPLAMVT_TAX_CLASS_CODE is name of program and MT_EXTDATA_ITEM is screen element

0 Kudos

I'd rather say that you assign a global program field and not a dynpro field.

0 Kudos

Yes I agree. My solution was proposed for such fields which are not part of global or local pool as seen in the debugger.

0 Kudos

What do you mean? What are"fields which are not part of global or local pool as seen in the debugger." ?

See:

https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abendeclaration_va...

0 Kudos

My suggestion was about dynpro fields. (As a last resort) Some times at the exit or place where we need to write code, some screen field values are not present but we still need to process them so we can program via screen elements. Also, the variables used to hold dynpro fields are local to the method or subroutine. But yes, I agree that we should minimize or as far as possible do away with global declarations.

For example - in classic SE38 report , we now declare selection screen parameters with reference to variables decalred in an interface.

Please don't confuse. As far as I know, you cannot address dynpro fields in ABAP programs. Instead dynpro fields are passed to and from global program variables that have the same name at PAI and PBO.

0 Kudos

Got your point....I was confused between dynpro fields (which are actually global ) thought that they are local to a program. Also, why are you suggesting to that global program fields are better than dynpro fields. Please shed some light.

0 Kudos

Please make yourself acquainted with the basics of dynpro programming.

0 Kudos

ok...I will check the links given by you. Thanks

horst_keller
Product and Topic Expert
Product and Topic Expert