on 09-01-2008 2:36 PM
Hello,
Could you please help me with the steps to build an extractor for BI 7.0 to get the the sales text of the material that is in R3 transaction MM03?
Thanks & Regards,
Adriana Oliveira
Z extractor using ABAP to read sales text
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Adriana,
if you need to use a function module to read the values which you need (rather than values being easily available in a table) then I think the simplest method to get the data is to create a function module based data.
Steps:
1) Create a structure in transaction SE11 which contains fields:
- Material
- Sales Organisation
- Distribution Channel
- Sales Text (first 60 chars?)
2) Identify the parameter with which to call read text to obtain the text you need
3) Create a new function module group
4) Copy an existing ATTR Datasource which is based on a function module - use table Roosource to identify a datasource with
Datasource Type = ATTR
Extraction Method = F2 (Function Module)
use you new function module group
5) Change your new function module to read a table containing one material master record for each material, sales org and distribution channel (MVKE - Sales Data for Material) and for each entry call read text to obtain the sales text
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Thanks for the prompt help.
I have done the structure using SE11 with fields VKORG (Sales Org), MATNR (Material), VTWEG (Distribution Channel), MAKTG (Description).
After I have created the function group ZZSALES_TXT
Then I copied a FM that was used in a Z extractor for ATTR.
Now I need to replace the parameters to make my FM read the sales text and populate the fields I selected in the structure, right?
My doubt is what I fill in the tabs Import, Export, Tables and Source Code. In the source code I saw something like CALL FUNCTION, so I believe I should write
CALL FUNCTION 'READ_TEXT'
EXPORTING
reference_structure = 'ZZSALES_TEXT'
it_fields = i_t_fields[] ???
TABLES
status_list = s_t_status ???
EXCEPTIONS
OTHERS = 1.
ELSE.
Thanks & Regards,
Adriana Oliveira
To read material sales text using function module "Read_text" you need to pass the following parameters:
ID, LANGUAGE, NAME and OBJECT
Sales text is returned in internal table LINES in field TDLINE.
Experiment using SE37 to check the parameters to use and find a set of parameters which give text which you know exists.
The value of NAME is a concatenation of material + sales org + distribution channel from MVKE. You will need to create a temporary variable to construct the value.
note... BW only handles text up to 60 chars without going to quite a lot of trouble so you will need to only use the first 60 chars of the sales text.
ID = 0001, OBJECT = MVKE
Edited by: Mark Roberts on Sep 3, 2008 1:46 PM
Robert,
I am used with standard extractors and it is difficult for me to make this function module READ_TEXT become the extractor of sales text. I am getting the following error message:
INCLUDES LZZSALES_TXTTOP
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
I went to RSO2 and created a master data datasource with this FM. But this FM is still with error.
When I go to SE37, I have in the tab source code the following:FUNCTION ZBW_SALES_TXT.
DATA: g_objname LIKE makt-MAKTG.
refresh git_mat_text1.
call function 'READ_TEXT'
exporting
id = '0001'
language = 'P'
name = g_objname
object = 'MVKE'
tables
lines = git_mat_text1
exceptions
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
others = 8.
ENDFUNCTION.
In the main program or global data I left only what is automatically done.
In tha tab IMPORT I have
CLIENT LIKE SY-MANDT
ID LIKE THEAD-TDID
LANGUAGE LIKE THEAD-TDSPRAS NAME LIKE THEAD-TDNAME OBJECT LIKE THEAD-TDOBJECT ARCHIVE_HANDLE LIKE SY-TABIX 0
LOCAL_CAT
SPACE
I_DSOURCE TYPE ZZSALES_TEXTMASTER
Thanks & Regards,
Adriana Oliveira
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.