cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Start Routine Lookup!

Former Member
0 Likes
729

Hi

How to write a lookup in Start Routine to calling customer table. we are maintains values in custom table.

i am

Regds,DS

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Likes

Hi,

Here you want to allow records only Divsion=20,30 and sales org = CN, in this case you can directly delete records from SOURCE_PACKAGE where Divsion<>20,30 and sales org<>= CN.

Hepe these delete statement can do you job straightforwardly,

DELETE SOURCE_PACKAGE Where DIVISION NP '20' OR DIVISION NP '30'.

DELETE SOURCE_PACKAGE Where SALES_ORG NP 'CN'.

Thanks,

Manikandan Dhanakoti.

Former Member
0 Likes

simple write select statement to pick data from customer table

select * from XXX into table it_tab where KEYF = XXXX

declare it_tab type standard table of that customer table.

Former Member
0 Likes

Hi,

Lookup in Start routine can be done comparing SOURCE_PACKAGE records against Z table* contents(Create Internal table of Z* structure & fill it with table content). Create Loop over SOURCE_PACKAGE & compare internal table content (record by record).

Implement other logic as you required. Always try to use optimized ABAP coding. Since, looping is in use here. Better coding practice will improve performance.

Thanks,

Manikandan Dhanakoti

Former Member
0 Likes

Hi,

You simply need to create an internal table of type customer table in start routine global declaration part.

After that you will have to populate that internal table using select query in start routine. e.g.

SELECT *

FROM XYZ

into table it_xyz

where key1 = 'AB'. etc.

In this case XYZ is customer table and it_xyz is internal table. Once values are available in internal table you can use them in field routine or start routine as per the need.

Regards,

Durgesh.

Former Member
0 Likes

Thanks for the quick response,

Can you provide me the exact code for below the requirement..

I want to put filter Divsion=20,30 and sales org = CN based on the filter i want to restrict data in datatagets while loading..

Thanks,DS

Former Member
0 Likes

Hi,

In your case it seems like you do not need any look up activity because your requirement is straight forward, you can simply put the filter in DTP and directly load the required data.

You do not need to do any look up in start routine. Just use DTP filter.

Regards,

Durgesh.