Frage

I have the following question:

I have a dypro and added via the layout builder a dict delement: mara-matnr

Now I see it in my element list: enter image description here

Now I wanted to know, how to access the value of the matnr in my PAI which looks like this:

MODULE user_command_1000 INPUT.
  " HOW TO ACCESS THE VALUE OF MATNR HERE?
ENDMODULE.
War es hilfreich?

Lösung

I have to guess what you did to get that far, and I’d strongly recommend not to continue along that road. What I’d rather do is

  • create a new dictionary structure (not a transparent table!) that contains the screen fields you need
  • use the TABLES statement with the structure to declare a global variable in your program or function pool top include
  • place the fields of the structure on the screen, just like you did with the MARA fields in your example
  • use the fields of your global variable in your coding

The way you prepared the screen, you would have to add a global variable named MARA with the structure of the transparent table MARA, probably using the statement TABLES mara. While this is perfectly possible, it’s also really dangerous - you could end up changing the database contents inadvertedly, especially since you seem to be rather new to the system.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top