Skip to Content
author's profile photo Former Member
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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    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?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.