‎2007 Sep 04 7:51 AM
hi,
i am makin report of sales order in which i am using date field by taking select single statement like this : -
SELECT SINGLE EDATU FROM VBEP INTO <b>SCH_DATE</b> WHERE VBELN = ITSO-VBELN AND POSNR = ITSO-POSNR.
<b>write : sch_date</b>.
I want to use selection screen of it when i run report ,i know d method of making selection screen but to make selection screen of variable defined for filed like dis is bit confusing for me .
Plz reply as fast as possible as it is urgent for me,help given will be definately rewarded.
‎2007 Sep 04 8:03 AM
parameters zvbeln type vbep-vbeln.
parameters:zposnr type vbep-posnr.
move zvbeln to itso-vbeln.
move zposnr to itso-posnr.
SELECT SINGLE EDATU FROM VBEP INTO SCH_DATE WHERE VBELN = ITSO-VBELN AND POSNR = ITSO-POSNR.
write : sch_date.
plz reward points if dis helps
‎2007 Sep 04 7:59 AM
parameters zvbeln type vbep-vbeln.
parameters zposnr type vbep-posnr.
move zvbeln to itso-vbeln.
move zposnr to itso-posnr.
den carrout ur selection.
plz reward points if dis helps
Message was edited by:
abapuser
‎2007 Sep 04 7:59 AM
can you plz explain your requirement in detail?
what exactly you want to display in selection screen?
‎2007 Sep 04 8:08 AM
i want to display selection screen like dis : -
SALES ORDER SCHEDULE DATE _______ TO __________
I had declared dis field in my report by using select single statement and d code of dis statement as follows: -
SELECT SINGLE EDATU FROM VBEP INTO <b>SCH_DATE</b> WHERE VBELN = ITSO-VBELN AND POSNR = ITSO-POSNR.
write: / SCH_DATE.
I want to make d selection screen of dis field which is written in d write statement above...
plzz reply fast and get rewarded.
‎2007 Sep 04 8:17 AM
call ur own screen after select stament and display data on it.u cant do dis on standard selection screen.
call screen 100.
provide SALES ORDER SCHEDULE DATE an to as label and create an output field on screen say zout which 'll hold dis value.
use da following statement in PBO of screen 100.
zout = sch_date.
‎2007 Sep 04 8:03 AM
parameters zvbeln type vbep-vbeln.
parameters:zposnr type vbep-posnr.
move zvbeln to itso-vbeln.
move zposnr to itso-posnr.
SELECT SINGLE EDATU FROM VBEP INTO SCH_DATE WHERE VBELN = ITSO-VBELN AND POSNR = ITSO-POSNR.
write : sch_date.
plz reward points if dis helps
‎2007 Sep 04 8:12 AM
Hi Ric,
I think ITSO is an internal table which you are filling some where in your program.
Use the below code instead of writing select single...
TABLES: vbep.
SELECT-OPTIONS: s_vbeln FOR vbep-vbeln,
s_posnr FOR vbep-posnr.
DATA: BEGIN OF it_vbep OCCURS 0,
vbeln LIKE vbep-vbeln,
posnr LIKE vbep-posnr,
edatu LIKE vbep-edatu,
END OF it_vbep.
DATA: sch_date LIKE vbep-edatu.
SELECT vbeln posnr edatu FROM vbep
INTO TABLE it_vbep
WHERE vbeln IN s_vbeln
AND posnr IN s_posnr.
IF sy-subrc = 0.
SORT it_vbep BY vbeln posnr.
ENDIF.
READ TABLE it_vbep WITH KEY vbeln = itso-vbeln
posnr = itso-posnr.
IF sy-subrc = 0.
sch_date = it_vbep-edatu.
ENDIF.
write:/ sch_date.