Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

report help 3

Former Member
0 Likes
577

a report which lists the delivery no, delivery qty, customer no, material no, material description for the given shipping points.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
553

here is the program add some more fields for LIPS table as you want ...and in the select query also



REPORT zSAMPLE.
 
TYPES: BEGIN OF t_output,
        salesdoc TYPE vbak-vbeln,
        item1    TYPE vbap-posnr,
        deldoc   TYPE likp-vbeln,
        item2    TYPE lips-posnr,
        billdoc  TYPE vbrk-vbeln,
        item3    TYPE vbrp-posnr,
       END OF t_output.
 
DATA: gt_output TYPE STANDARD TABLE OF t_output,
      wa_output LIKE LINE OF gt_output.
 
START-OF-SELECTION.
 
  SELECT vbak~vbeln vbap~posnr likp~vbeln lips~posnr vbrk~vbeln vbrp~posnr
    FROM vbak
   INNER JOIN vbap
      ON vbak~vbeln = vbap~vbeln
   INNER JOIN lips
      ON lips~vgbel = vbak~vbeln
     AND lips~vgpos = vbap~posnr
   INNER JOIN likp
      ON likp~vbeln = lips~vbeln
   INNER JOIN vbrp
      ON vbrp~aubel = vbak~vbeln
     AND vbrp~aupos = vbap~posnr
   INNER JOIN vbrk
      ON vbrk~vbeln = vbrp~vbeln
    INTO TABLE gt_output.
 
END-OF-SELECTION.
  IF NOT gt_output[] IS INITIAL.
 
    LOOP AT gt_output INTO wa_output.
      WRITE: / wa_output-salesdoc,
               wa_output-item1,
               wa_output-deldoc,
               wa_output-item2,
               wa_output-billdoc,
               wa_output-item3.
    ENDLOOP.
  ENDIF.

reward points if it is usefull ...

Girish

4 REPLIES 4
Read only

Former Member
0 Likes
553

Hi

Use the Delivery tables LIKP and LIPS and take the required fields and develop

Its easy, since the data is from two tables

write a single join and fetch the data into Int table and display

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
553

Please go though the link for the sap script with example of all the Attribute ,elements .

Header

pages

windows

page windows

paragraph formats

character formats

Documentation

<a href="http://">http://www.thespot4sap.com/Articles/SAPscript_example_layout%20set.asp</a>

reward points if it is usefull ...

Girish

Read only

Former Member
0 Likes
553

sorry by misake i posted another forums answer.

Girish

Read only

Former Member
0 Likes
554

here is the program add some more fields for LIPS table as you want ...and in the select query also



REPORT zSAMPLE.
 
TYPES: BEGIN OF t_output,
        salesdoc TYPE vbak-vbeln,
        item1    TYPE vbap-posnr,
        deldoc   TYPE likp-vbeln,
        item2    TYPE lips-posnr,
        billdoc  TYPE vbrk-vbeln,
        item3    TYPE vbrp-posnr,
       END OF t_output.
 
DATA: gt_output TYPE STANDARD TABLE OF t_output,
      wa_output LIKE LINE OF gt_output.
 
START-OF-SELECTION.
 
  SELECT vbak~vbeln vbap~posnr likp~vbeln lips~posnr vbrk~vbeln vbrp~posnr
    FROM vbak
   INNER JOIN vbap
      ON vbak~vbeln = vbap~vbeln
   INNER JOIN lips
      ON lips~vgbel = vbak~vbeln
     AND lips~vgpos = vbap~posnr
   INNER JOIN likp
      ON likp~vbeln = lips~vbeln
   INNER JOIN vbrp
      ON vbrp~aubel = vbak~vbeln
     AND vbrp~aupos = vbap~posnr
   INNER JOIN vbrk
      ON vbrk~vbeln = vbrp~vbeln
    INTO TABLE gt_output.
 
END-OF-SELECTION.
  IF NOT gt_output[] IS INITIAL.
 
    LOOP AT gt_output INTO wa_output.
      WRITE: / wa_output-salesdoc,
               wa_output-item1,
               wa_output-deldoc,
               wa_output-item2,
               wa_output-billdoc,
               wa_output-item3.
    ENDLOOP.
  ENDIF.

reward points if it is usefull ...

Girish