2007 May 15 6:24 AM
HI I AM USING
FOLLOWING SELECT
SELECT VKVBELN VKXBLNR VKERZET VKERDAT
VPCHARG VPFKIMG VP~MATNR
INTO TABLE T_VBRK
FROM VBRK AS VK JOIN VBRP AS VP
ON VKVBELN = VPVBELN
WHERE VK~FKART = 'ZBFJ'
WHERE VK~ERZET GE VAR_TIME4
AND VK~ERZET LE VAR_TIME3
WHERE VK~ERDAT EQ VAR_DATE3
WHERE VK~ERDAT EQ VAR_DATE1
CONCATENATE VAR_TIME1(2) ':' VAR_TIME12(2) ':' VAR_TIME14(2) INTO
VAR_TIME3.
CONCATENATE VAR_TIME1(2) ':' VAR_MIN2 ':' VAR_TIME1+4(2) INTO
VAR_TIME4.
CONCATENATE VAR_DATE16(2) '.' VAR_DATE14(2) '.' VAR_DATE1(4) INTO
VAR_DATE3.
CONCATENATE VAR_DATE26(2) '.' VAR_DATE24(2) '.' VAR_DATE2(4) INTO
VAR_DATE4.
DATA IS THERE IN VBRK TABLE BUT IT IS NOT GETTING SELECTED
2007 May 15 6:33 AM
I think the prb is with the multiple WHERE clauses that you written in the query. Can you adjust that into one WHERE clause and try to give the fields in order as in database table.
Regards,
parvez.
2007 May 15 6:27 AM
hi Sonika,
Check out whether the order of fields in the select statement is same as that of your internal table.
Regards,
Santosh
2007 May 15 6:32 AM
INTERNAL TABLE HAS THE STR :
DATA : BEGIN OF T_VBRK OCCURS 0 ,
VBELN LIKE VBRK-VBELN,
XBLNR LIKE VBRK-VBELN, " changed to accomodate for all entries
ERZET LIKE VBRK-ERZET,
ERDAT LIKE VBRK-ERDAT,
CHARG LIKE VBRP-CHARG,
FKIMG LIKE VBRP-FKIMG,
MATNR LIKE VBRP-MATNR,
KUNNR LIKE LIKP-KUNNR,
END OF T_VBRK.
I THINK PROBLEM IS WITH THE DATA TYPE
COZ IN VBRK ERZET IS OF TYPE TIMS
BUT WE ARE TAKING IT OF CHAR TYPE IF WE TAKE IT OF TIMS TYPE THEN IT ALLOWS ONLY FOR LENGTH '6' WHILE IN VBRK OUTPUT LENGTH IS '8'
2007 May 15 6:33 AM
I think the prb is with the multiple WHERE clauses that you written in the query. Can you adjust that into one WHERE clause and try to give the fields in order as in database table.
Regards,
parvez.
2007 May 15 6:38 AM
SELECT VKVBELN VKXBLNR VKERZET VKERDAT
VPCHARG VPFKIMG VP~MATNR
INTO TABLE T_VBRK
FROM VBRK AS VK JOIN VBRP AS VP
ON VKVBELN = VPVBELN
WHERE VK~FKART = 'ZBFJ'
AND VK~ERZET GE VAR_TIME4
AND VK~ERZET LE VAR_TIME3
AND VK~ERDAT EQ VAR_DATE3
AND VK~ERDAT EQ VAR_DATE1
2007 May 15 6:42 AM
try this way
SELECT VKVBELN VKXBLNR VKERZET VKERDAT
VPCHARG VPFKIMG VP~MATNR
INTO <b>CORRESPONDING FIELDS OF</b> TABLE T_VBRK
FROM VBRK AS VK JOIN VBRP AS VP
ON VKVBELN = VPVBELN
WHERE VK~FKART = 'ZBFJ'
AND VK~ERZET GE VAR_TIME4
AND VK~ERZET LE VAR_TIME3
AND VK~ERDAT EQ VAR_DATE3
AND VK~ERDAT EQ VAR_DATE1
2007 May 15 6:59 AM