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

changing the code of report based on additional field on selection screen

Hi friends,

on my selection screen i have 2 fields

S_TKNUM = Shipment

S_KUNNR = Ship to

Based on the values on the selection screen entered for shipment the report is getting the delivery number and shipment for vttp table in a internal table t_vttp.

and now based on the delivery number in the internal table t_vttp it is getting the delivery number and shipto from likp table into a internal table t_likpand its also cheking for the ship to (s_kunnr ) ie : its only getting the shipto which are entered in the selection screen..

later after fetching the data its looping both internal tables t_vttp and l_likp and moving the data to another internal table t_final.

in the final internal table t_final i have 3 fileds delivery number , shipment and shipto and its displaying it on to the screen.

now i need to change the report in the following way.

we need to add anothe filed on the selection screen customer purchase order no ( S_BSTNK )

now my new selection screen should be in the below format.

S_BSTNK = Customer Purchase Order number

S_TKNUM = Shipment

S_KUNNR = Ship to

Now my requiremnt is when the user enters only shipment on the screen then only the previous logic shouls excute ( ie old report logic )

and when the user enters the value in the field customer purchase order number ( s_bstnk )

when the user enters the value in S_BSTNK , it should get all the invoices fromVBRK table.

and later for those all invoices i should get the deliveries from VBFA table.

Now for all those deliveries i should get the SHIPMENT & SHIPTO and should check for the values entered in S_TKNUM and S_KUNNR ( ie : if the user enters shipment and shipto in S_TKNUM and S_KUNNR it should get only those values which are entered ).

now later i should get Customer purchase order number ( BSTNK ) Shipment (TKNUM ) and shipto ( KUNNR ) in one internal table .

Can any one tell me how to link it.

Regards,

Priyanka.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 23, 2008 at 01:29 PM

    HI

    Try this

    If s_bstnk is initial.

    old Logic

    else.

    New Logic

    endif.

    New Logic

    for s_bstnk better get a data from vbfa for po invoice instead of using vbrk as it will effect performance.

    Table i_invoce.

    Then for using i_invoce then get deliveries from vbfa into i_deliveries

    Then get the shipment based on i_deliveries.

    Now

    Loop at shipment table

    read the delivery table .

    read the invoice table

    append the final table.

    endloop.

    Hope this hint help

    Cheers

    Joginder

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 12:42 PM

    make d additional field as mandatory and develop the logic as fetching starting from dat input

    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.