Issues In Reading Attribute Values From Master Data

Hi All,
I have a requirement where, i need to read an attribute value from master data. I have a characteristic YCSTATMCG (AT Cost Group Code) which is the master data from where i have to read the attribute, 0PROFIT_CTR (Profit Center). The attribute thus read, has to be populated into another characteristic, YPROFIT_C.  But YCSTATMCG referes to another characteristic, YCSTCG. Here is the FOX Code I wrote with YPROFIT_C as the changing characteristic and 0AMOUNT as keyfigure.
DATA V_ATCP TYPE YCSTATMCG.
DATA V_PROFIT TYPE YPROFIT_C.
DATA V_PROFITC TYPE YPROFIT_C.
DATA V_AMOUNT TYPE F.
V_ATCP = OBJV().
MESSAGE I020(YCO_CFT) WITH V_ATCP.
V_AMOUNT = {0AMOUNT,  # }.
V_PROFIT = ATRV('0PROFIT_CTR' , V_ATCP).
MESSAGE I020(YCO_CFT) WITH V_PROFIT.
{0AMOUNT, V_PROFIT} = V_AMOUNT.
But this is not working. The ATRV() function is not reading the attribute values at all. Any solutions and suggestions is highly valued.
Thanks in advance
Swaroop

Hi,
even i have the same situation.
i just want the attribute value of a char to be populated into another characteristic in the planning query.
my question is whether i should populate the keyfigure field also in the FOX code.
if so should i populate both 0amount and 0quantity fields as i have 2 keyfigure fields.
Thanks for your help
Nishanth

Similar Messages

  • No Source Fields(But wants to read attributes of another master data infoob

    Hi
    Im planning to use the 2LIS_03_BF datasource. I have two master data infoobjects(0PRODVERS_ATTR, 0MAT_PLANT_ATTR).
    Im loading data from 2LIS_03_BF in DSO . But this datasource doesn't contains the source fields for master data infoobjects 0PRODVERS_ATTR, 0MAT_PLANT_ATTR.
    So hw can i read the attributes of these master data infoobjects. please let me know
    kumar

    Hi
    You can write a routine for this purpose we call it lookup in bw terms ie if the field isnt present in the source then you can take the values from the other targets may it be ods or master data and the selection is based on the keyfields in both the targets ie source field and the target from which the field has to be picked.
    lets say i want customer Number  from the MD Customer and i dont have customer number in the souce field so i will write a routine in the start routine to select customer number from customer master data put the field in the internal table and then write a update routine in the field customer number that reads the values into the work area from the internal table and then put the result in the result field from work area.
    below is the syntax.
    TYPES:BEGIN OF t_custnumber,
    ***declare the fields u will be using including the keyfileds in the souce**
    customer number type /bic/0customer number
    END OF t_custnumber.
    ........internal table to read data into......
    DATA : i_custnumber.TYPE STANDARD TABLE OF t_custnumber.
    work area to read data from internal table
    DATA : wa_custnumber   TYPE t_custnumber,
    select
    customer number
    x
    y
    from table customer
    into i_custnumber
    where
    x= x of data package ie below ods (source)
    y = y of data package ie below ods (source)
    The above routine comes in the start routine
    Now for the update routine
    read table i_custnumber into wa_custnumber with key
    x= x of comm_strucute ie below ods (source)
    y = y of comm_strucute ie below ods (source)
    Result =wa_custnumber-customer number
    in start routine the souce table is called as data package but in case of update routine the same souce table is termed as communication structure thus comm_strucuture.
    hope this is handy information assign points if applicable
    thanks
    puneet

  • Function Module to Read attributes value from Classification tab

    Dear Experts ,
    We are using material classification in the material master. Under classification tab of material master , we are maintaining certain characteristics and their corresponding values.
    I want to read those values and use those in one of the report.
    Can you please help me in identifying Function Module which will return the values of all the attributes of that material.
    Thanks in advnce,
    Regards,
    Nikhil

    You can check those details using CT06 transaction.
    FM CLAF_CLASSIFICATION_OF_OBJECTS can be used to retrive the data using program.
        CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
          EXPORTING
            class              = gc_class
            classtext          = 'X'
            classtype          = gc_classtype
            clint              = gc_mmpsk
            features           = 'X'
            language           = sy-langu
            object             = l_object
            key_date           = sy-datum
            initial_charact    = 'X'
            change_service_clf = ' '
            inherited_char     = 'X'
          TABLES
            t_class            = lt_class
            t_objectdata       = lt_objectdata
          EXCEPTIONS
            no_classification  = 1
            no_classtypes      = 2
            invalid_class_type = 3
            OTHERS             = 4.

  • Showing all Characteristic values from Master Data in WebI report

    I want to show master data when there is no data in Cube, I have created constant variable with 1 value in Bex and I am using that in the crystal report but it's still not showing master data. Can anybody help me on this.
    Thanks,
    Ravi

    Hi Ingo,
    Thanks for your quick reply, I have created formula with constant value 1. Do I need to put that formula in rows or columns or as Free Char?
    Thanks,
    Ravi

  • Count values in master data

    Hello,
    If i want to implement a report that gives me the customers that had no sells for a period, i have to read the values from master data.
    But if i have to implement counters on that how can be done ? I don't want to change the data structure, can it be done only in the report ?
    I know how to count the occurrences of a characteristic relative to one or more other characteristics but that doesn't work because the values must exist in the infoprovider.
    Regards,
    Jorge Diogo

    Hello,
    Maybe you can try one of the below to see if it works:
    1) Create a MPRO on customer master data object and the transactional dataprovider. Now restrict the query where CALDAY is EQ # or any date EQ # which is for the sales date in the transactional DP.
    2) Include customer object in the rows of query and from its properties select display data from master data object. Now create condition where the sales amount is EQ 0 and keep it active.
    Regards,
    Shashank

  • Read attribute value of a master data object's master data object

    Hi Guys,
    I have a peculiar condition where I need to read attribute value of a master data object's master data.
    Requisition (ZREQUI) is linked to Candidacy (ZCDCY) by object called Recquisition.
    Candidacy  (ZCDCY) is linked to Candidacy Activity (0CDCY_ACT) by object called Candidacy.
    I want to populate attribute called due date in ZREQUI by reading lowest value of due date value of 0CDCY_ACT. There can be multiple hits.
    If I can get the code to do this, I would really appreciate it.

    Here is the outline of the code ,as per my understanding..chk if it can help u
    In start routine write a select statement to pick all the data from 0cdcy_act.
    select 0CDcY_ACT ZCDCY  DuE_DATE from /BiC/P0CDCY_ACT
    into table itab1
    for all entries in source_package
    where ZCDCY = source_package-ZCDCY.
    as you need the lowest due date, sort the iTAB1
    sort itab1 by due_date  ZCDCY.   (default is acending order)
    In the field routine of your due date
    Read table itab1tnto wa_itab1 where
    ZCDCy = source_fields -ZcDcY.
    now duedate = wa_itab1-duedate.

  • Reading From Master data failure

    I have enhanced 0VENDOR_ATTR with ZTERM field from LFM1 table and everything is working fine ...I have added ZPMNTTRMS as an attribute in 0VENDOR and loaded the data its working fine .But when I was using this ZPMNTTRMS in a DSO and say read from master data and took the source field as 0vendor ...then Iam not able to see the values for this info object...Ofcourse 0VENDOR is loading fine....Can any one let me know what is the issue here ? / Is there any routiene / some code needs to be written some where to get the ZPMNTTRMS values in DSO ...Please advice ASAP...
    regards

    hi nw2004s,
    have you performed change run ?
    rsa1->tools->apply attribute/hierarchy change run (or RSATTR)
    hope this helps.

  • Update from master data attribute

    I have a key figure in my update rule for Info source(0HR_PA_1) for info cube(0PA_C01). I would like to update this KF to write a codein update rule  like no.of working hours/37.
    No.of working hours(ZWOSTD) is an attribute of 0employee master data. 0employee object is there in transfer structure for info source 0HR_PA_1.
    Is it possible to get attribute value(No.of working hours) which is  char type fom 0employee masterdata.
    Please help me with this.
    Thanks a lot

    Hi,
    just do a select on view /bi0/memployee.
    select * into wa from /bi0/memployee
    where employee = comm_structure-employee
    and    objvers = 'A'
    and    dateto >= comm_structure-<date field>
    and    datefrom <= comm_structure-<date_field>.
    Make sure the content of zwostd is numeric and assign it to your keyfigure.
    result = wa-/bic/zwostd.
    That should work.
    regards
    Siggi
    PS: may be you need to convert the datatypes.
    Message was edited by:
            Siegfried Szameitat

  • Reading any value from table into a string (Especially date etc..)

    How would I read any value from a table into a string?
    Currently doing the following...
    data ret_val type string.
    select single (wa_map-qes_field) from z_qekko into ret_val
    where
    angnr = _angnr.
    When the source field is a date it bombs though.
    The result goes into a BDCDATA-fval.
    regards
    Dylan.

    Tried...
    1    DATA: lp_data TYPE REF TO DATA.
    2    FIELD-SYMBOLS: <value> TYPE ANY.
    3    CREATE DATA lp_data LIKE (wa_map-qes_field).
    4    ASSIGN lp_data->* TO <value>.
    5    SELECT SINGLE (wa_map-qes_field) FROM zquadrem_qekko INTO <value> WHERE angnr = _angnr.
    Complains that (wa_map-qes_field) is not defined in line 3.
    Think that the bracket thing is only available via SQL.
    What about CREATE DATA lp_data type ref to object. ?
    Would the above declaration work?
    regards

  • Subprocess 33 was not successful. Master cannot read return value from S 33

    Hi All,
    We are on BI 7.0 SP 19.
    We have submitted a planning sequence in the background with automatic packaging.
    The planning sequence has two steps:
    Step 1. Z_PLNG_FUNCTION1
    Step 2. Z_PLNG_FUNCTION2
    As per automatic packaging, the system chose 0ACCOUNT for packaging.
    When submitted, each step has been submitted to 30 packages as 30 subprocesses.
    For Step 1, the log shows that All subprocesses  executed.
    For Step 2, the log shows that the subprocess 33 and 58 failed, which means subprocess #3, and # 28 for the step 2 as the subprocess is numbered in the log in combination with step 1.
    The messages in the log for the failed subprocesses are as follows:
    @5C\QError@     Subprocess 33 was not successful
    @5C\QError@     Master cannot read return value from subprocess 33
    @5C\QError@     Subprocess 58 was not successful
    @5C\QError@     Master cannot read return value from subprocess 58
    Our question is on how to find the exact cause of the subprocess failure.
    I tried to look for the details on the error messages, they have been not helpful.
    What is meant by 'Master cannot read return value from subprocess' and how to get the exact cause of the failure?
    Thanks in advance,
    Best Regards,
    - Shashi

    Shashi,
    implement the following notes and check again:1368659, 1525723, 1532061.
    Regards,
    Marc
    SAP Techology RIG

  • Filter on attribute of 0MATERIAL filters charac. values without master data

    Hi SAP-Gurus,
    I've a problem while executing a query (this query is based on a MultiProvider).
    I got the message "Filter on attribute of 0MATERIAL filters charac. values without master data" and I don't know why.
    When I don't use the filter on the navigation attribute, the query can be executed without any errors, bute when I set the filter, the warning message comes again.
    Thank you all,
    Clemens

    Dear all SAP Gurus,
    we've solved this problem and this is the solution:
    The warning is triggered by the method CL_RSDRV_ODS_QUERY-PROCESS_SFC_WITH_ATR when the BExFlag of the InfoProvider is not set. Using DSOs for direct update there is no change to change the BExFlag. As a result queries based on a DSO for direct update always throw the above mentioned warning when filter-characteristics are attributes.
    Regards, Clemens

  • Start Routine to Populate Account Group Field from Master data of 0Customer

    Hello Friends. Please help me edit this ABAP code to make it work. I am putting this code in start routine in between two DSO. where I am using the
    Start Routine to Populate Account Group Field from Master data of 0Customer. I do not want to use read from master data functionality since that field 0customer is not there in dso but similar field 0debitor is there. so i want to put this code
    during the load from source DSO to Target DSO.
    Error Explicit length specifications are necessary with types C, P, X, N und
    DATA: L_S_DP_LINE TYPE DATA_PACKAGE_sTRUCTURE.
        types: begin of comp,
         CUSTOMER       type  /BI0/OICUSTOMER,
         ACCNT_GRP          type /BI0/OIACCNT_GRP,
       end of comp.
        DATA: l_S_comp type comp.
        DATA: L_th_COMP TYPE HASHED TABLE OF COMP WITH UNIQUE KEY customer INITIAL SIZE 0.
    IF  L_th_COMP[] IS INITIAL.
    SELECT CUSTOMER ACCNT_GRP FROM /BI0/PCUSTOMER APPENDING CORRESPONDING FIELDS OF TABLE L_th_COMP.
    ENDIF.
    LOOP AT SOURCE_PACKAGE INTO L_S_DP_LINE.
    READ TABLE L_TH_COMP INTO L_S_COMP WITH TABLE KEY CUSTOMER = L_s_DP_LINE-CUSTOMER
    IF SY-SUBRC = 0.
    L_S_DP_LINE-/BIC/ACCNT_GRP = L_S_COMP-/BIC/ACCNT_GRP.
    MODIFY SOURCE_PACKAGE FROM L_S_DP_LINE.
    ENDIF.
    ENDLOOP.
    soniya kapoor
    Message was edited by:
            soniya kapoor

    Hello Wond Thanks for Good Answer and good option, But Client does not like this option and does not like Nav Attribute so he does not want to turn on any Nav Attribute, In general also We hav requirement to read a third table while uploading 1 dso table to 2 dso table,
    so  Please help me edit this ABAP code to make it work. I am putting this code in start routine in between two DSO. where I am using the
    Start Routine to Populate Account Group Field from Master data of 0Customer.
    No syntax Error But during the load it is updating the source table and not the target table. how to define now target table.
    ***SOURCE DSO Table
    types: begin of typ_tgl1.
        include type /BIC/AZDAFIAR000.
        types: end of typ_tgl1.
        types: begin of comp,
         CUSTOMER       type  /BI0/OICUSTOMER,
         ACCNT_GRP          type /BI0/OIACCNT_GRP,
       end of comp.
    DATA: L_th_COMP TYPE HASHED TABLE OF COMP WITH UNIQUE KEY customer
    INITIAL SIZE 0.
      data: wa_itab type COMP.
        data: wa_zdtg type typ_tgl1.
    IF  L_th_COMP[] IS INITIAL.
    ***Master Data Table
    SELECT CUSTOMER ACCNT_GRP FROM /BI0/PCUSTOMER APPENDING CORRESPONDING
    FIELDS OF TABLE L_th_COMP.
    sort L_th_COMP by CUSTOMER.
    ENDIF.
    LOOP AT L_th_COMP into wa_itab.
    select * from /BIC/AZDAFIAR000 into wa_zdtg
                        where DEBITOR  eq wa_itab-CUSTOMER.  *** SOURCE DSO Table
    IF SY-SUBRC = 0.
    wa_zdtg-ACCNT_GRP = wa_itab-ACCNT_GRP.
    MODIFY /BIC/AZDAFIAR000 from wa_zdtg. *** modify SOURCE DSO Table
    ENDIF.
      endselect.
        endloop.
    soniya kapoor

  • How can I access the Attribute Values from the Search Region

    Hi all,
    I have a table which contains Company id, department id, and PositonId. For a particular Company and Department there may be multiple records.
    I have to pupulate a table which contains the position and other details that comes under a particular Department and Position based on the selection in the Three comboBoxes.
    Also I have to populate a select many Shuttle to add new postions and records under a particular Department.
    I created a query panel *(Search Region)* for the serch and a table to display the data. That is working fine.
    Now the issue is I am using a view criteria to populate the shuttle with two bind variables ie, DepartmentId and CompanyId.
    If the serach will return a resuktant set in the table it will also pupulate the correct records, otherwise ie, if the if the serch result is empty the corresponding iterator and the attribute is setting as null.
    SO I want to access the attribute values from the Search Region itsef to populate the shuttle.
    I don't know how can I access the data from the Search Region.
    Please Help.
    Regards,
    Ranjith

    you could access the parameters entered in search region by the user as follows:
    You can get handle to the value entered by the user using queryListener method in af:query.
    You can intercept the values entered as described
    public void onQueryList(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    List<Criterion> searchList = qdes.getConjunctionCriterion().getCriterionList();
    for ( Criterion c : searchList) {
    if (c instanceof AttributeCriterion ) {
    AttributeCriterion a = (AttributeCriterion) c;
    a.getValues();
    for ( Object o : a.getValues()){
    System.out.println(o.toString());
    //call default Query Event
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    public void onQueryTable(QueryEvent queryEvent) {
    // The generated QueryListener replaced by this method
    //#{bindings.ImplicitViewCriteriaQuery.processQuery}
    QueryDescriptor qdes = queryEvent.getDescriptor();
    //get the name of the QueryCriteria
    System.out.println("NAME "+qdes.getName());
    invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",queryEvent);
    private void invokeQueryEventMethodExpression(String expression, QueryEvent queryEvent){
    FacesContext fctx = FacesContext.getCurrentInstance();
    ELContext elctx = fctx.getELContext();
    ExpressionFactory efactory = fctx.getApplication().getExpressionFactory();
    MethodExpression me = efactory.createMethodExpression(elctx,expression, Object.class, new Class[]{QueryEvent.class});
    me.invoke(elctx, new Object[]{queryEvent});
    Thanks,
    Navaneeth

  • Getting the attribute value from a table from page def using el expression.

    Hi,
    Am using Jdeveloper 11.1.2.0.0 and have a requirement as follows for which a sample is been created. Requirement is as follows..
    1. Have a Taskflow that has a readonly table Employee.
    2. On clicking of a button called "route" checks if the selected row , Manager id attribute value = 200 then navigate to first page else if manager id attribute value is 200 then navigate to second page.
    Through the page def , if it has form , then we can access the attributes like #{data.view_FirstPageDef.ManagerId} . In case of acquiring the same attribute value from table using page def ? is what am unable to get..
    Have achieved the routing concept using the Router activity on Taskflow. But am unable to get the selected row attribute value of a table from the employee page def.. Can someone suggest on the same...
    Thanks and Regards,
    Vinitha G

    On the router, right click its icon in the task flow and create a page definition. Then in the page def file, add an iterator based on the same View Object from the table in the first page, then add a value attribute mapped to managerId in the View Object iterator. Finally in the router you can write EL expressions along the lines of #{bindings.ManagerId.inputValue = 200} or #{bindings.ManagerId.inputValue != 200}.
    CM.

  • Protecting the attribute value from getting reset!

    Hello all,
    I have attached a custom drop down search help to the attribute "SERVICE_UNIT_NAME" in the "BTPARTNERSET" context node. The drop down list contains a blank entry as well as a couple of other entries, I have placed a create object statement for my search help class in the Getter method "GET_V_SERVICE_UNIT_NAME" while written the following code in the setter method "GET_P_SERVICE_UNIT_NAME" as suggested by one of the esteemed experts here on the forum.
      case iv_property.
        when if_bsp_wd_model_setter_getter=>fp_fieldtype.
             rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
      endcase.
    This drop down list is showing correctly, however my problem is that if the user selects any value from the drop down list, the selected value gets copied to the attribute but when ever the user press an "ENTER KEY" or any other action, the value in the attribute gets initialized to the first value in the drop down list which is a "BLANK" value. I want to preserve the value originally selected by the user from the drop down list, without it being reset by any other user actions on the screen.  Do I need to redefine any other method for this attribute? I'll appreciate any help.
    Regards,

    Naresh and Sumit, many thanks for your valuable inputs however, I have tried your code but I am still facing the same issue, as the attribute value for "SERVICE_UNIT_NAME" is getting refresh every time an "ENTER" is pressed on the page. Let me specify some other detail that may help in understanding this behaviour for the attribute value, actually when on the initial page, user has to enter his phone no / network ID, so that the standard functionality bring about the city, postal code, country etc. so once these values are set in the related attributes, the user will click on the incident button, which brings about a search help (web dialogue) for partner selection, so any value selected, is displayed afterwards in the "SERVICE_UNIT_NAME" attribute on the next page. However, after putting the custom drop down list at the said attribute, the value selected on the previous page is not populating in the attribute and the user can select the value from the custom drop down list now, but once he press "ENTER" or pushes any other button the page, the selected value in the attribute gets initialized. Is there a way to check for the user input?

Maybe you are looking for

  • Macbook Pro not charging; do I need a new Magsafe Charger?

    I have an early 2011 13-inch Macbook pro. Recently, I've noticed that my magsafe charger does not charge my laptop. The light turns on (dull green, not bright like it normally is) and the power source is switched to the power adapter, but the adapter

  • Itunes wont open i have tried literally EVERYTHING

    i unpgraded to 6.04 and it wouldnt open, so i tried downloading 6.03 again, then i tried using the ipod cd and it wont open... Ive read all the posts i have downloaded ewido, and deleted the sc file, i have removed and reinstalled at least 10 times,

  • Monitor will not turn on

    After years of good service, my monitor will not turn on when I turn on the MacPro. 

  • Current period ?

    What is ment by "current period" ,I have seen in some of the scripts , is this reserved word for Essbase Calc Scripts. Script like ... FIX(Current period) Profit =sales-po-additional cost; ENDFIX

  • Will there be anymore updates for the iphone 4s?

    I'm trying to choose between two phones, one being the iphone 4s, and I was just wondering if there will be anymore software updates for the 4s.