Application Development 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: 

Item Category - Data Element and Domain - PSTYP (internal display )vs EPSTP (external display)

Former Member
0 Kudos


Hello,

Was hoping I could get some insight on the data elements of PSTYP and EPSTP...  Let me explain what I'm trying to do...

I want to explain to a developer to append the "item category" data element on a custom table we have and allow it to have a drop down (domain) of the values of the  Item category in purchasing document (external display).  This is the same values in EKPO where you can select a U (stock transfer) L (subcontracting) etc... The reason for this is I want this value to be passed to the PO Create BAPI during a custom process we have which creates these POs.

When I check the data elements in hte system, PSTYP has a value table of T163, which has a drop down of the item category values... However, the values (PSTYP) are listed "internal" meaning Stock Tranfser is to a 7 value (check table EKPO - PSTYP for example) instead of the external display, which is  = U. It looks like data element EPSTP is the element which is contains the external values I want, BUT I do not see a value table assigned to this data element.

Is there a standard element and  domain of these external display values , or do I just need to have them create a new data element and domain for these values?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Thanks to the both of you....  So, basically what you are saying is I should take the internal values of PSTYP and the conversion exit should happen in the BAPI to make it the external display value to be passed to Purchase Order ( item category field) ?

Just so we're all saying the same thing....

Here is the internal values I see i table using  T163

Althought table  t163x &  t163y have both fields PSTYP the field EPSTP,  EPSTP does have a drop down value available like PSTYP, it just maps to the values of what PSTYP

Where I see the drop down values I want is under configuration area

SPRO -MM - Purchasing -Purchase Order - Define Doc Types - ( highlight item and click on  allowed item category)

So conclude, you believe I should have them use data element PSTYP and then a conversion exit should be required in the BAPI Create to make sure the actually value is passed to the item category on PO?

Appericate inputs!


5 REPLIES 5

Former Member
0 Kudos

Hello,

As you said PSTYP has a value table T163, can you please see what values it is taking as user-input at the table level in SE11?  Is it taking the external format or the internal format?  I have seen a similar kind of thing for PARWV (partner funct.). I think the conversion is automatic or else we need to use conversion-exits. The complexity increases when we are working with internal & external data formats for currency amount fields, quantity fields, UOM, ISO codes. You can refer to the links:

http://help.sap.com/saphelp_nw04/helpdata/en/a5/3ec9ea4ac011d1894e0000e829fbbd/content.htm

SAP Library - BAPI User Guide CA-BFA)

Please do some reading & that will help you clear the basic idea. I did the same to understand the underlying mechanisms.

Regards,

Tanmoy

nabheetscn
Active Contributor
0 Kudos

Hi James

please check t163x and t163y table for the same for the mapping. I dont have acces to system please check if it has some conversion exit implemented.

nabheet

Former Member
0 Kudos

Thanks to the both of you....  So, basically what you are saying is I should take the internal values of PSTYP and the conversion exit should happen in the BAPI to make it the external display value to be passed to Purchase Order ( item category field) ?

Just so we're all saying the same thing....

Here is the internal values I see i table using  T163

Althought table  t163x &  t163y have both fields PSTYP the field EPSTP,  EPSTP does have a drop down value available like PSTYP, it just maps to the values of what PSTYP

Where I see the drop down values I want is under configuration area

SPRO -MM - Purchasing -Purchase Order - Define Doc Types - ( highlight item and click on  allowed item category)

So conclude, you believe I should have them use data element PSTYP and then a conversion exit should be required in the BAPI Create to make sure the actually value is passed to the item category on PO?

Appericate inputs!


0 Kudos

Hi James,

little bit investigated, Yes confirmed the PSTYP values are converting from internal to external values through the below function modules in the BAPI or standard PO transactions.

screen shot attached in more details!

call function 'ME_ITEM_CATEGORY_OUTPUT'

call function 'ME_ITEM_CATEGORY_OUTPUT'


find the kind of coding in standard programs ( ex: LMEPOF7E)


* cause of external/internal item category first translate to external

     data: lf_epstp1 like t163y-epstp,

           lf_epstp2 like t163y-epstp.

     call function 'ME_ITEM_CATEGORY_OUTPUT'

          exporting

               pstyp  = dekpo-pstyp

          importing

               epstp  = lf_epstp1

          exceptions

               others = 01.

Former Member
0 Kudos

Thank you all for your help and explaination .... I believe my solution will be for them to append data element  pstyp with the domain values in table  T163 and then standard BAPI will convert it to the correct value and enter it on the PO.

Thanks again.