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: 

F4 HELP

Former Member
0 Kudos
82

DEAR all,

i have two paramters

1) material number

2) material element.

in selection screen when i select material number then it must show element of that selected material automatically.

for a single material i have multiple element.

          • point is assured ******

1 ACCEPTED SOLUTION

Former Member
0 Kudos
55

hi rich

nice to meet you.

see its actully ztable i have one filed zcapno and second filed is zasset.

for example

for single zcapno

i have 11 entries in zasset .

i.e zcapno = '002'.

zasset =BATA_11_AC

zasset =BATA_11_IT

zasset =BATA_11_BPI

zasset =BATA_11_BPI

etc.

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
55

Where is this material element stored, what table?

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
55

Not sure where this element is, but in this example, I'm building a listbox for the WERKS field based on the material which is entered. You must enter the material number and hit enter, then the listbox will have the associated plants.



report zrich_0001.

type-pools: vrm.

data: ivrm_values type vrm_values.
data: xvrm_values like line of ivrm_values.
data: name type vrm_id.

parameters: p_matnr type mara-matnr.
parameters: p_werks as listbox visible length 20.

at selection-screen output.

  perform build_listbox.



*---------------------------------------------------------------------*
*       FORM build_listbox                                            *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
form build_listbox.

* now build the listbox
  name = 'P_WERKS'.

  refresh ivrm_values.

  data: imarc type table of marc with header line.
  select * into table imarc from marc where matnr = p_matnr.

  loop at imarc.
    xvrm_values-key = imarc-werks.
    xvrm_values-text = imarc-werks.
    append xvrm_values to ivrm_values.
  endloop.

  call function 'VRM_SET_VALUES'
       exporting
            id     = name
            values = ivrm_values.

endform.

Is this what you are interested in?

REgards,

RIch Heilman

Former Member
0 Kudos
56

hi rich

nice to meet you.

see its actully ztable i have one filed zcapno and second filed is zasset.

for example

for single zcapno

i have 11 entries in zasset .

i.e zcapno = '002'.

zasset =BATA_11_AC

zasset =BATA_11_IT

zasset =BATA_11_BPI

zasset =BATA_11_BPI

etc.

0 Kudos
55

Oh ok, then you should be able to use the example above to retrieve your values from your "Z" table and fill the list box for the second parameter.

Is this what you want?

Nice to meet you too.

Regards,

Rich Heilman

Former Member
0 Kudos
55

hi rich,

perfect solution its working.

thanks i have given 10 point to you.