cancel
Showing results for 
Search instead for 
Did you mean: 

Start Routine

Former Member
0 Kudos

Hi SAP Experts,

I have a start routine as coded below

Read all the material which has the same Prod hier

SELECT MATERIAL PROD_HIER /BIC/ZTACOIND FROM /BI0/PMATERIAL

INTO TABLE it_material

for all entries in SOURCE_PACKAGE

WHERE PROD_HIER = SOURCE_PACKAGE-prod_hier AND

MATL_TYPE = 'FERT'.

SORT it_material by prod_hier material /BIC/ZTACOIND ascending.

The scenario is that i have many materials of the type "FERT" tied up to to the same product hierarchy

example material product Hierarchy

M1 P1

M2 P1

M3 P1

The above routine helps me to fetch only the first record and not able to fetch the remaining

materials in it_material table. Can anyone please help me modify this

code to help bring the remaining materials also.

thank you in advance for your continued support and help

Regards,

sanjeev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sanjeev,

When you use 'for all entries' in your select statement it's mandatory to use all the key fields in your select (for selecting).

So try using all the key fields in your select from the table /BI0/PMATERIAL and let me know.

Regards,

Siva.

Former Member
0 Kudos

Hi Siva,

Thanks for your response. Material is the only key field and i have already selected this. Pls let me know if u can think of any other option.

Regards,

Sanjeev

Answers (0)