Skip to Content
author's profile photo Former Member
Former Member

PO Data and Number into report

Dear all

i have a requirement of adding po date and po number in my y report.

po data is taken from vbkd (bstdk)

po number is taken from vbkd (bstkd)

the values are not fetched in output screen please help on this.

i have done the following

i have declared a itab for vbkd .

DATA : BEGIN OF ITAB_VBKD OCCURS 0,

VBELN LIKE VBKD-VBELN,

BSTKD LIKE VBKD-BSTKD,

BSTDK LIKE VBKD-BSTDK,

END OF ITAB_VBKD.

i have declared po num and po date in final itab too....

select query goes as this

SELECT VBELN BSTKD BSTDK FROM VBKD INTO TABLE ITAB_VBKD FOR ALL ENTRIES IN ITAB3 WHERE

VBELN = ITAB3-AUBEL_I.

then i need to move or read from itab i am not sure so i did the reading part as like this

READ TABLE ITAB_VBKD WITH KEY VBELN = ITAB3-AUBEL_I BINARY SEARCH.

IF SY-SUBRC IS INITIAL.

MOVE ITAB_VBKD-BSTKD TO ITAB3-BSTKD.

MOVE ITAB_VBKD-BSTDK TO ITAB3-BSTDK.

ENDIF.

and i have declared in fieldcat too.

wat could be the reason of displayed in the output screen wat needs to be done please help me on this URGENT!!!!!!!!!111

Edited by: Alvaro Tejada Galindo on Apr 11, 2008 3:23 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 04:14 AM

    Hi Koushik,

    Look at the below sample ALV program

    http://www.sap-img.com/abap/use-simple-alv-functions-to-make-reporting-easy.htm

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 04:17 AM

    Sagar,

    Your requirement look like.

    You have iatb3 with data,For all entries of itab3 you are selecting the data from table into internal table ITAB_VBKD.Now you want to move all values to final internal table.

    Am i correct? If i am right do like...

    IF NOT itab3[] IS INITIAL.

    SELECT VBELN BSTKD BSTDK FROM VBKD

    INTO TABLE ITAB_VBKD

    FOR ALL ENTRIES IN ITAB3

    WHERE VBELN = ITAB3-AUBEL_I.

    ENDIF.

    LOOP AT ITAB3.

    MOVE-CORRESPONDING ITAB3 TO i_final.

    LOOP AT ITAB_VBKD WHERE VBELN = ITAB3-AUBEL_I

    MOVE ITAB_VBKD-BSTKD TO i_final-BSTKD.

    MOVE ITAB_VBKD-BSTDK TO i_final-BSTDK.

    ENDLOOP.

    ENDLOOP.

    NOTE : i_final should have all required fields of itab3 and ITAB_VBKD.

    <REMOVED BY MODERATOR>

    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 3:24 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 04:20 AM

    HI,

    1. Before the READ statament, include sort both the internal tables by the key fields , which u r using for mapping.

     SORT ITAB_VBKD ASCENDING BY  VBELN 
     SORT ITAB3          ASCENDING BY  AUBEL_I  
    

    Now try.....

    reply back

    With Rgds,

    S.barani

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 11, 2008 at 12:10 PM

    Dear all

    still my query is not answered.

    please reply.

    itab3 is the final itab where all the values have been moved.

    wat needs to be done.

    please reply.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI

      try this...

      Loop at itab3.

      READ TABLE ITAB_VBKD WITH KEY VBELN = ITAB3-AUBEL_I BINARY SEARCH.

      IF SY-SUBRC IS INITIAL.

      MOVE ITAB_VBKD-BSTKD TO ITAB3-BSTKD.

      MOVE ITAB_VBKD-BSTDK TO ITAB3-BSTDK.

      ENDIF.

      modify itab3 transporting bstkd bstdk.

      Endloop.

      may be u need only modify statement...

      check once..

      Regards

      SYed A

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.