‎2010 Mar 09 2:28 PM
Dear Contributors,
I am hopefull for finding solution to my problem from one of you.
My requirement is i would like to pass all the elements of the selection screen of LDB to non-sap application so as they can replicate and show all those parameters there. Once those are filled from there then i need to take them and process the LDB.
My question is i dont know how to get the selection screen parameters. I tried using FM 'RPY_DYNPRO_READ' and passed progname and screen number in that. It gave back all the parameters but we cant co-relate which parameter is from which table (like we say MATNR like MARA-MATNR).
Without having Technical details of field, non-sap application could not able to process it or show the required F4 help etc
Anyone know about it, can guide me....
Regards
Munish Garg
‎2010 Mar 09 4:28 PM
call function 'LDB_CONVERT_LDBNAME_2_DBPROG'
exporting ldb_name = headsg-logdb "#EC DOM_EQUAL
flag_existence_check = space
importing db_name = logdbprog
exceptions others = 1.
if sy-subrc eq 0.
call function 'SELOPTS_AND_PARAMS'
exporting program = logdbprog
tables selpars = dbselpars
exceptions program_non_existent = 1
subroutine_pool = 2
load_problems = 3
others = 4.
endif.
‎2010 Mar 10 10:39 AM
Hi Henrotte/Other,
The FM mentioned by you gives names of the select-options and parameters etc but what about the technical details....Like field-type and field-length etc etc.....
Id there any way to get it?
Regards
Munish garg
‎2010 Mar 18 9:40 AM
in field DBFIELD of structure SELPARS you will find the reference used for defining the parameter
- if the reference contains a - then it is tabname-fieldname
- if the reference contains a single word then it is the data element or data domain
- if the reference is empty then the parameter has a generic type and you cannot get much information about it
based on this you are able to get all fields attributes using DDIF_* functions