2009 Apr 03 9:40 AM
Hello together,
we have a tool to do corrections to CO-PA-transaction data.
Because we have different structures for different operating concerns (and therefore different dynpros for those different operating concerns) we now want to dynamize this tool.
The idea is to have one dynpro with the maximum number of CO-PA-fields and to control via a functional-module which vields are existing for one operating concern and those are not existing for that operating concern to change the attributes to non-changeable.
Is there any command in ABAP to check if one field (e.g. one valuefield) is contained in one table-structure (e.g. table-structure CE1xxxx) ?
Kind regards
Udo
2009 Apr 03 9:42 AM
Use this function module.read the documentation in SE37.
DDIF_FIELDINFO_GET
2009 Apr 03 9:42 AM
Use this function module.read the documentation in SE37.
DDIF_FIELDINFO_GET
2009 Apr 03 11:16 AM
*--Verfy infoobject exit or not
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = KNA1 <--here you pass structure
tables
DFIES_TAB = <itab> <--get list of fields in the table
exceptions
not_found = 1
internal_error = 2
others = 3.
if sy-subrc <> 0.
message text-005 type 'E' .
endif.
loop at <itab> assigning <field>.
*here you validate wether field is available in the structure or not
assign component 'SIGNCH' of structure <field> to <f_sign>.
if sy-subrc ne 0.
message 'SIGNCH field is not available in table KNA1' type 'E' .
endif.
endloop.
Regards,
Peranandam