‎2008 Jan 15 10:49 AM
Hi there ,
I have created the screen which includes the mat no,date of creation,created by,mat type,mat grp,now the isue is when i give the mat no and click on the display button the other fields are not displaying thedat do any body know how to code this?
Rgrds.
‎2008 Jan 15 10:59 AM
Hello,
Do like this.
For example the screen fields are taken from the structure MARA.
So in the PAI of the screen.
If the flow logic.
MODULE SHOW_VALUES.
In the report
MODULE SHOW_VALUES. IF NOT MARA-MATNR IS INITIAL. SELECT * FROM MARA WHERE MATNR = MARA-MATNR. ENDIF. ENDMODULE.
Hope this will helps you.
Cheers,
Vasanth
‎2008 Jan 15 11:06 AM
Hi Chidambar,
Try this code if you are retrieving the values from ZTable:
TABLES : ZTRAINEE22_EKKO "ZTRAINEE22_EKKO is the ZTABLE Name
CASE SY-UCOMM.
WHEN 'DISPLAY'.
SELECT SINGLE * FROM ZTRAINEE22_EKKO WHERE EBELN
= ZTRAINEE22_EKKO-EBELN.
ENDCASE.
Here the select querry is retrieving the values from the ZTRAINEE22_EKKO table into the work area ZTRAINEE22_EKKO for the particular EBELN in the WHERE condition.
The field names in the screen should also have the same names as the field names in the ZTABLE
i.e.,
ZTRAINEE22_EKKO-EBELN.
If an internal table is used for the scren names,then use this select querry:
DATA : ITAB LIKE ZTRAINEE22_EKKO OCCURS 0.
TABLES : ZTRAINEE22_EKKO
CASE SY-UCOMM.
WHEN 'DISPLAY'.
SELECT SINGLE * INTO CORRESPONDING FIELDS OF ITAB FROM ZTRAINEE22_EKKO WHERE EBELN = ZTRAINEE22_EKKO-EBELN.
ENDCASE.
This select querry will retrieve data into the internal table ITAB and thus they will be displayed on the screen.
Revert for any other querries.
Reward points if helpfull.
Regards,
Kashyap Ivaturi