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

fetching from tables

Former Member
0 Likes
759

a report is being generated in which we put sold to party,delivery date and plant.This gives us some output

Now we have to add two fields that is loading date and ship to party in the screen and the output has to be same as the previous.can u please guide me as to how can i fetch the data.

6 REPLIES 6
Read only

Former Member
0 Likes
671

Use abap's SQL select instruction.

Read only

Former Member
0 Likes
671

Hi,

You have to add two news fields in the SELECT sentence and the internal table.

SELECT Field1 Field2 Newfield3 Newfield4

FROM Table

INTO CORRESPONDING FIELDS OF TABLE Internal_Table

WHERE Conditions.

Regards,

José

Read only

Former Member
0 Likes
671

hi sikha,

please give some detail about your table, which is being used in report.

the problem you are facing only due to wrong place of condition.

first find which table is containing loading date and ship to party as a field.

try to use select-options on screen in place of parameter which is easy to use and less errorneous.

if loading date and ship to party is persent into current table then put condition directly.

otherwise use one interal table fill it on condition and delete the data from final table.

if you need any help please lwt me know.

thank

abhishek

Read only

Former Member
0 Likes
671

Hi...

Nothing critical in this. First u have to find relation between old fields and new fields. Then consider that fields also while retrieving data like below.

1. If some of new fields and some old fields belong to same table then add these new fields also in select statement.

2. If not the field some between table and retrieve data from other tables also using new fields and using for all entries restrict data from display.

Regards,

KP.

Read only

awin_prabhu
Active Contributor
0 Likes
671

Hi friend,

Just add additional conditions in your where clause.

Ex:

select sold-to-party delivery-date plant from table where

sold-to-party in s_sold-to-party

and delivery-date in s_delivery-date

and plant in s_plant

and loading-date in s_loading-date <------ New Condition 1

and ship-to-party in s_ship-to-party. <------ New Condition 2

Plz change all field names according to your query.

Thanks..

Edited by: Sap Fan on Feb 19, 2009 5:26 AM

Read only

Former Member
0 Likes
671

Hi,

First of all check that two fileds exits same table where you are adding new fields in select stament.

SELECT Field1 Field2 Newfield1 Newfield2

FROM Table

INTO CORRESPONDING FIELDS OF TABLE Internal_Table

WHERE Conditions (Newfield1).

Once you added two new fileds in same manar you should update internal table structure also then only that values passes in to that internal table.

Regads

Md.MahaboobKhan