cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify service material in SO

Former Member
0 Kudos

Hi Experts,

WE have one custom reports which fetches SO data and do some processing.

Currently all SO are processed.

Clients wants to exclude SO with service material.

Which table should I use to dentify if any material in SO is normal material or service material?

Regards,

Jigar Thakkar.

Accepted Solutions (0)

Answers (3)

Answers (3)

shashi_thakur
Contributor
0 Kudos

Hi Jigar,

The Service Material will be ideally identified by the material type (MTART). So in your program add a filter, wherein you select all the materials and check the material type from MARA table. If it is a Service Material type-then delete that entry else let it  get processed.

Regards,

Shashi Thakur

Former Member
0 Kudos

Hi Shashi,

Thanks for your help.

One more question

Is there any way we identify which material type is for service material? or should we hard code material types in code?

Regards,

Jigar Thakkar.

shashi_thakur
Contributor
0 Kudos

Hi Jigar,

It depends on how the customizing has been done and will be done in future in your system. The material type configuration is stored in the Table T134. It has a Field called Field Reference FLREF. This has a value of DIEN set for the Service Materials and MTPOS as LEIS. So assuming that you are using DIEN material type or whichever custom Service Material type you are using has been created as a copy of this material type and has the same value DIEN in the Field Reference and will be so in future , then yes you can use this to identify the material type (MTART from MARA for all materials found in the report and then find this particular field value for the MTART).

But a better option would be to add a field on the selection screen of the report called Material types to be excluded. In this field you can add the Service Material types as default. This will help you to exclude/include other material types in future as and when needed and avoid hard-coding thereby providing flexibility to the report and user.

Regards,

Shashi Thakur

Message was edited by: Shashi Thakur

Lakshmipathi
Active Contributor
0 Kudos

If you know which data gets stored in header table and which data gets stored in item table, you would not have posted this query.  Just put efforts to know which table stores material code and its related data so that you will answer to your query.

G. Lakshmipathi

siva_vasireddy2
Active Contributor
0 Kudos

Hi,

in the table-VBAP the Item category-PSTYV will be different for the service material.

you can use the Table-  WB2_V_VBAK_VBAP and exclude the service materials through item category selection.

Former Member
0 Kudos

Hi Siva,

I came across VBAK -Header data table and VBAP -Item data table.

Can you pls explain about this table WB2_V_VBAK_VBAP ??

Thanks,

Pavan.

siva_vasireddy2
Active Contributor
0 Kudos

Hi,

This Table Combines both Header and Item Information in a single table.

there is no need to join both VBAK and VBAP tables