Hello everyone,
I need to display MATNR from table VBAP in the table in main window of a sap script.
How do I do that?
This is what I tried:
in txt element i wrote
/: PERFORM get_matnr IN PROGRAM ZGET_matnr
/: USING &VBAP-MATNR&
/: CHANGING &SIFRA&
/: ENDPERFORM
and in my program I wrote this:
FORM get_matnr TABLES itab STRUCTURE itcsy
otab STRUCTURE itcsy.
DATA: sifra TYPE vbap-matnr.
READ TABLE itab WITH KEY name = 'VBAP-MATNR' TRANSPORTING value.
sifra = itab-value.
otab-value = sifra.
MODIFY otab TRANSPORTING value WHERE name = 'SIFRA'.
But when I type &SIFRA& where I need my data to be displayed I dont get any values.
I also saw while debbuging that when I want to get some data from BSEG, I can do that, but from VBAP I cant.
Can anyone help I need a reply ASAP.
Thanks in advance.
Request clarification before answering.
Any answer that helps would be highly appreciated. Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 12 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.