Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Re: Module Pool - Refresh Screen Fields Progmatically

$
0
0

THe code to read and update the Module pool Screen fields is below:

In this below example we are reading Job field value and updating Job text field on Module pool screen. 

 

DATA: BEGIN OF htab OCCURS 2.                           

INCLUDE STRUCTURE dynpread.                   

DATA: END OF htab. 

DATA: lv_stell TYPE wplog-objid,    

   

lv_stltx TYPE stltx. 

CLEAR htab. REFRESH htab.            

MOVE job_field_name TO htab-fieldname.                

CLEAR htab-fieldvalue.              

APPEND htab. 

 

CALL FUNCTION 'DYNP_VALUES_READ'                      

EXPORTING                                              

dyname              = sy-cprog                     

dynumb              = sy-dynnr                  

TABLES                                                

dynpfields          = htab                        

EXCEPTIONS                                            

invalid_abapworkarea = 1                              

invalid_dynprofield  = 2                              

invalid_dynproname  = 3                              

invalid_dynpronummer = 4                              

invalid_request      = 5                              

no_fielddescription  = 6                              

invalid_parameter    = 7                              

undefind_error      = 8                            

OTHERS              = 9.     

                  

IF sy-subrc EQ 0.                                          

READ TABLE htab WITH KEY fieldname = job_field_name.

* Search Position text   

CLEAR: lv_stltx, lv_stell.   

MOVE htab-fieldvalue TO lv_stell.   

SELECT SINGLE stltx FROM t513s INTO lv_stltx                                 

WHERE sprsl EQ sy-langu                                 

AND  stell EQ lv_stell.   

 

Job_text_field_name  = lv_stltx.


Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>