on 10-02-2007 2:26 AM
Hi,
We have maintained approval limit value in Extended Attributes ---> PO Value Limit -
>local values ---> 'APPRV_LIM' attribute. say (2,500.00 USD). But when i read this attribute value using 'BBP_READ_ATTRIBTUES' function module, in the export parameter ET_ATTR-VLIST-VALUE - I get value like this ##倂ఀUSD .
I know the problem here is that APPRV_LIM attribute data type is CURR 15. and data type of ET_ATTR-VLIST-VALUE is CHAR 255.
Can anyone tell me how should I read value properly.
Thanks,
Krupa
Use FM RH_READ_INFOTYPE_NNNN (or at least something with _nnnn at the end)
On table HRT5503 and subtype 200 this is where the approval limit is stored.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Alexander, sorry I forgot the initial part of coding.
CLEAR: lv_attr_list, t_attr_list.
REFRESH: t_attr_list.
lv_attr_list-attr_id = 'APPRV_LIM'.
lv_attr_list-get_label = c_on.
APPEND lv_attr_list TO t_attr_list.
CALL FUNCTION 'BBP_READ_ATTRIBUTES'
EXPORTING
iv_user = lc_user_name
it_attr_list = t_attr_list
IMPORTING
et_attr = it_attr
EXCEPTIONS
object_id_not_found = 01
no_attributes_requested = 02
attributes_read_error = 03.
Hi
<b>Seems like problem in your custom code. Type conversion problem is happening here.</b>
<u>Please provide with more details in next reply. Meanwhile, try either of these 2 approaches :-></u>
1) Try, a read from database table HRV1222B directly..
SELECT * FROM hrv1222b
INTO TABLE gt_v1222b
WHERE attrib = 'APPRV_LIM'
OR attrib = 'SPEND_LIM'.
2) Alternatively,
Create a temporary variable in your custom program of type Char - length 20 and transfer the value first to this variable from ET_ATTR-VLIST-VALUE and tehn afterwards move the temporary variable value to the required field.
Which SRM version are you using ?
Do let me know.
Regards
- Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Atul and Robin for your prompt reply. Points awarded.
Alexander, try as below. It works
CODE***********************
DATA: t_attr TYPE bbpt_attr,
is_attr TYPE bbps_attr,
iv_vlist TYPE bbps_attr_values,
p_data TYPE bbp_spers_al.
FIELD-SYMBOLS <approval_limit> LIKE p_data.
CLEAR is_attr.
READ TABLE it_attr INTO is_attr WITH KEY attr_id = 'APPRV_LIM'.
IF sy-subrc = 0.
CLEAR iv_vlist.
READ TABLE is_attr-vlist INTO iv_vlist INDEX 1.
CLEAR: p_data.
IF sy-subrc = 0.
ASSIGN iv_vlist-value TO <approval_limit> CASTING.
p_data = <approval_limit>.
ENDIF.
ENDIF.
thanks,
K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.