on 01-13-2006 11:00 AM
Hello group,
I'm working in a sem-bps project and I have a problem with an exit function, because
I need the function module to read the value of a characteristic's attribute.
I read the standard function module UPF_VARIABLE_USER_EXIT_ATTR: it retrieves the attribute value through the import parameters ITO_ATTR TYPE UPC_YTO_ATTR.
I put this attribute on my exit function but when I check the content of the attribute its always empty. Do you know how I can transmit the parameter from the exit planning function to the function module?
Any input is appreciated, thanks Andrea
Andrea, if you want to fill a variable with the characteristic's attribute of another variable look at the document "HowTo_BPS_VarOfTypeExit.pdf" (i send at your e-mail if you want). It Follows an extract in which it's filled the second variable with the characteristic's attribute of another variable:
******************************************************
Source code: Attribute values
SELECT * FROM /bi0/mbps_produ INTO TABLE lt_chavl
WHERE bps_prodl = ls_varsel-low.
if sy-subrc <> 0.
MESSAGE e026(upc) WITH ls_varsel-low '0BPS_PRODL'.
attribute value not found
exit.
endif.
ls_varsel-seqno = '0000'.
ls_varsel-chanm = '0BPS_PRODU'.
LOOP AT lt_chavl INTO ls_chavl.
ls_varsel-seqno = ls_varsel-seqno + 1.
ls_varsel-low = ls_chavl-bps_produ.
APPEND ls_varsel TO eto_charsel.
ENDLOOP.
********************************************************
In the example above ls_varsel contains the attribute value to provide to eto_charsel (the output table in which you have the result).
I suggest you to debug your application to see how ito_attr is passed to the FM.
Hope it helps.
Fabio
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andrea,
/bi0/mbps_produ is the name of the master data table of the characteristic, related to the example in the doc, for which you want to retrieve the attribute.
In your case you have to specify the master data table of you characteristic (/bi0/m<<i>your_standard_infoobj</i>> or /bic/m<<i>your_custom_infoobf</i>>).
Hope it helps.
Fabio
Thank you Fabio,
the SELECT FROM statement works fine in order to retrieve the attribute value!
To Yannick:
at the very beginning I wasn't able to retrieve attribute values, so I thought to use an exit type variable, but I see that everything works fine with the standard attribute variable. I chose attribute variable because the selection on planning levels were based on attribute conditions, then a characteristic variable wouldn't fit the needs. I hope I answered your questions.
Andrea
Hello Andrea,
may I ask why you use Userexit for Attribute variable?
I Inquired by SAP about the aim of Attribute variable of type Userexit.... There is no difference to the characteristic variable of type userexit. ==> In both case you have to fill the ETO_CHARSEL table with the values of the base charateristic!!! So no advantage in that type of variable....
It would interest me if the function works as designed or if it is Bugged as designed !!
Best regards
Yannick
PS:
I wanted to fill the Attribute variable with values of the Attribute of the base characteristic, like it is the case for Attribute variable with fixed values!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.