cancel
Showing results for 
Search instead for 
Did you mean: 

get field in script

Former Member
0 Kudos

hi ,

i got one requirement,that is i have to populate some fields into scripts.

there i am using on structure qcspec in that i have fields version and werks.

like this two more fields are there with the names qmtb_werks and pmt_version.

these two fields already passed to the script from that structure qcspec.

here my requirement is i need to pass to more fields that is version and werks

earlier i mentioned.when i tested it debugg node all fields

version and pmt_version values same and werks and qmtb_werks same.

but thing is version and werks can be poulate from qpmk table

and qmtb_werks and pmt_version from qapo table.i think its not useful if i take from stucture becoz all values r same.

how can i pass version and werks form qpmk table to form.in order to display script.

can any body suggest me regarding this issue.

urgent

for correct answer points r awarded.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi Suneetha,

If you want to do it simply- define a subroutine in your driver program and call this form in your script.

in driver program.

FORM GET_CANCEL_DATA TABLES ITAB STRUCTURE ITCSY
                          OUTTAB STRUCTURE ITCSY .
 if itab-name = 'V_ABC'.
*    select statement.
  loop at otab.
     if otab-name = 'V_WERKS'.
        otab-value = some value.
     elseif otab-name = 'V_VERSION'.
        otab-value = some value.
     endif.
     modify otab.
  endloop.  
 endif.
ENDFORM.

In script                                     
PERFORM GET_CANCEL_DATA IN PROGRAM ZWMSTUCL   
 USING &V_ABC&                            
 CHANGING &V_WERKS&                            
 CHANGING &V_VERSION&                           
ENDPERFORM  

hope this helps.

Regards,

Richa

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Based on my understanding, use the subroutine to get the werks and version data from table QPMK in the form editor. However look for the QPMK key fields data in runtime(Input to subroutine) and use them for data retrieval of werks and version and output fields data to form for display in the form.

From

Mahendra