Former Member

# How do i extract base amount, cst amount of an item in rseg?

SELECT RSEG~BELNR

RSEG~GJAHR

RSEG~BUZEI

RSEG~EBELN

RSEG~EBELP

RSEG~MATNR

RSEG~LFBNR

RSEG~BUKRS

RSEG~WERKS

RSEG~WRBTR

RSEG~LFPOS

RSEG~LIFNR

RSEG~MWSKZ " ADDED THIS FOR TEST

RSEG~MATNR

EKKO~AEDAT

J_1IMOVEND~J_1ICSTNO " ADDED THIS FOR TEST

FROM RSEG INNER JOIN EKKO ON RSEG~EBELN = EKKO~EBELN LEFT OUTERJOIN J_1IMOVEND

ON EKKO~LIFNR = J_1IMOVEND~LIFNR

INTO CORRESPONDING FIELDS OF TABLE IT_RSEG

FOR ALL ENTRIES IN IT_RBKP WHERE BELNR = IT_RBKP-BELNR

AND GJAHR = IT_RBKP-GJAHR

AND WERKS IN S_WERKS.

SELECT EKKO~EBELN EKKO~KNUMV RSEG~BUZEI

FROM RSEG INNER JOIN EKKO ON RSEG~EBELN = EKKO~EBELN

INTO CORRESPONDING FIELDS OF TABLE IT_SEG

FOR ALL ENTRIES IN IT_RSEG

WHERE EKKO~EBELN = IT_RSEG-EBELN.

SELECT

KWERT

FROM KONV INTO CORRESPONDING FIELDS OF TABLE IIT_SEG2

FOR ALL ENTRIES IN IT_SEG

WHERE KNUMV = IT_SEG-KNUMV AND KPOSN = IT_SEG-BUZEI AND KSCHL ='JIPC'.

SELECT

KWERT

FROM KONV INTO CORRESPONDING FIELDS OF TABLE IT_RSEG

FOR ALL ENTRIES IN IT_SEG

WHERE KNUMV = IT_SEG-KNUMV AND KPOSN = IT_SEG-BUZEI AND KSCHL ='BASB'.

Rest all is same.

10|10000 characters needed characters exceeded

### Related questions

• Former Member
Posted on Feb 27, 2013 at 09:26 PM

my queries:

SELECT

KWERT

FROM KONV INTO CORRESPONDING FIELDS OF TABLE IIT_SEG2

FOR ALL ENTRIES IN IT_SEG

WHERE KNUMV = IT_SEG-KNUMV AND KPOSN = IT_SEG-BUZEI AND KSCHL ='JIPC'.

and

SELECT

KWERT

FROM KONV INTO CORRESPONDING FIELDS OF TABLE IT_RSEG

FOR ALL ENTRIES IN IT_SEG

WHERE KNUMV = IT_SEG-KNUMV AND KPOSN = IT_SEG-BUZEI AND KSCHL ='BASB'

are fetching no vals... is my query apt for fetching base amount and cst amount?