on 03-09-2006 8:06 PM
Hi all!
I need to use infospoke to extract data from cube. the output format is flatfile. everything was fine, until I found out the key figure with negative value is not as expected.
For example:
sales qty 100 (-> ok)
return qty 100- (-> I need format in -100, the sign must be in front of the number).
Is there any simple way to resolve this issue?
Does anyone have same experiences? How did you fix this issue?
Thanks for your help!
Best regards,
lilly
Hi
Yes you can make changes using BADI.
Look in the Transformation tab amd read its Help its
same as a user exit but its called BADI.
you can add code there that will massage the data.
Reg's
Edan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Even if you are using transformation tab and implement the method IF_EX_OPENHUB_TRANSFORM~TRANSFORM it will show the data as 100- as it is a quantity field. In queries we have the control to set -ve sign but...
May be you can try to define a new character field and assign concatenated value of the '-' and the quantity without the sign (FOR A -VE QTY) and display this new field in the outputfile.
It has two structures one cyinfospokename and czinfospokename (this is the output structure) add your new field in this structure using se11.
GSM.
Hi
can you please explain me in detail how do you handle this issue with your solution with sample code..........I have the same requirement
1. the field added using append structure or not?
2. how do you delete the tali sample code ?
3. how do you add '-' sign to infront of the output fileds.
please mail me back as early as possible
thanks in advance
cheers sailekha.
Hi Lilly,
I'm telling you the procedure to create the BADI.
First you need to create the BADI in #SE19
1. In the dialog box, in the Implementation field, enter a name for the BAdI implementation and then choose Create ex.ZOBJECT.
2. The initial screen for creating BAdI implementations appears i.e."OPENHUB_TRANSFORM "..
3. In the initial screen, in the Short Text for Implementation field, enter a short text for the implementation.
4. Under Filter Types, specify the name of your InfoSpoke. With out Filter Types you can't save the Implementation. Filter type is nothing but specifying which infospoke(Ex.MYSPOKE).
5. In the tab strip, choose Interface.
6. In the Interface tab page, the Name of Implemented Class field is automatically filled since the system assigns a class name on the basis of the name of your implementation. Note: The class name must lie in the customer class Z... Change the suggested name accordingly if this is not the case.
7. Save your entries and assign a development class.
8. Position the cursor over the method and jump to method processing by double-clicking on it.
9. Between the method <Interface-Name>~<Method Name>. and endmethod commands, enter the coding required for the implementation.
<b>Example Code:</b>
method if_ex_openhub_transform~transform .
data: l_count type sy-tabix,
l_s_data_in type /bic/cymyspoke,
l_s_data_out type /bic/czmyspoke.
data l_dummy.
message i899(rsbo) with 'exit started' into l_dummy.
i_r_log->add_sy_message( ).
clear e_t_data_out.
loop at i_t_data_in into l_s_data_in.
move-corresponding l_s_data_in to l_s_data_out.
IF L_S_DATA_OUT-<NETVALUE> < 0.
L_S_DATA_OUT-<NETVALUE> = abs(L_S_DATA_out-<NETVALUE>) * -1.
ENDIF.
insert l_s_data_out into table e_t_data_out.
endloop.
message i899(rsbo) with 'exit finished' into l_dummy.
i_r_log->add_sy_message( ).
endmethod.
10. Save and activate your coding and navigate back to the Change Implementation screen.
11. Save your entries in the Change Implementation screen.
12. Note: You can also create an implementation for a BAdI first and activate it later. In this case, exit processing now.
13. Choose Activate.
14. When activating the application program, the coding you stored in the method is run.
This is the Total Procedure for Infospoke.
1. We need give the definition as "OPENHUB_TRANSFORM ".
2. Filter types these very important.
we can format the value with ABAP. I will check it out the formating option.
-
i don't know whether it will work or not i will check on tommrow.
move L_S_DATA_OUT-<NETVALUE> to chartacter variable.
concatenate '-' 'charecter variable into charecter variable.
move charecter variable to L_S_DATA_OUT-<NETVALUE>.
-
After this enable the check box in the Infospoke in transformation tab page.
Regards,
Nagesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried many ways i didn't get any clue. try to create one Charater Variable, populate data into that field from the Amount Field. Use the following code for populating.
You need to Enhance the output Structure(/bic/czmyspoke) in SE11. add that charecter field(CHAr with 18 length) in the above structure using APPEND STRUCTURES.
Add this code IN the Transform Menthod:
method if_ex_openhub_transform~transform .
data: l_s_data_in type /bic/cymyspoke,
l_s_data_out type /bic/czmyspoke.
data l_dummy.
message i899(rsbo) with 'exit started' into l_dummy.
i_r_log->add_sy_message( ).
clear e_t_data_out.
loop at i_t_data_in into l_s_data_in.
move-corresponding l_s_data_in to l_s_data_out.
*conerting into Character Data Type.
IF L_S_DATA_OUT-<NETVALUE> < 0.
move L_S_DATA_OUT-<NETVALUE> to L_S_DATA_OUT-<chartacter variable>.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT'
CHANGING
VALUE = L_S_DATA_OUT<Chatacter Filed>.
ENDIF.
insert l_s_data_out into table e_t_data_out.
endloop.
message i899(rsbo) with 'exit finished' into l_dummy.
i_r_log->add_sy_message( ).
endmethod.
All the best.
Regards,
Nagesh.
Hi all BW experts!
many many thanks for all your very helpful hint and tips and advises. As promised, I am updating you
Now the issue was fixed. Briefly,
- add one additional field in the target structure, type CHAR18
- remove the tailing '-'
- add "-" sign to in front of the output field
Best regards,
Lilly
Hi lilly
can you please explain me in detail how do you handle this issue with your solution with sample code..........I have the same requirement
1. the field added using append structure or not?
2. how do you delete the tali sample code ?
3. how do you add '-' sign to infront of the output fileds.
please mail me back as early as possible
thanks in advance
cheers sailekha.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.