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

Similar Messages

  • Start Routine to Populate Account Group

    Hello Thanks for your help and response from SDN but I modified the code as below but still it did not work now at all .please help
    Data: my_index like sy-tabix.
    Data: SOURCE_WA TYPE tys_sc_1.
        types: begin of I_MAT_TYPE,
         CUSTOMER       type  /BI0/OICUSTOMER,
         ACCNT_GRP          type /BI0/OIACCNT_GRP,
       end of I_MAT_TYPE.
        DATA: I_MAT TYPE STANDARD TABLE OF I_MAT_TYPE INITIAL SIZE 0.
    DATA: I_MAT_WA TYPE I_MAT_TYPE.
    IF  I_MAT[] IS INITIAL.
    SELECT CUSTOMER ACCNT_GRP FROM /BI0/PCUSTOMER APPENDING CORRESPONDING
    FIELDS OF TABLE I_MAT.
    *FOR ALL ENTRIES IN SOURCE_PACKAGE WHERE CUSTOMER EQ
    *SOURCE_PACKAGE-DEBITOR.
    SORT I_MAT BY CUSTOMER.
    ENDIF.
    LOOP AT SOURCE_PACKAGE INTO SOURCE_WA.
    MY_INDEX = SY-TABIX.
    READ TABLE I_MAT INTO I_MAT_WA WITH KEY CUSTOMER = SOURCE_WA-DEBITOR.
    IF SY-SUBRC = 0.
    SOURCE_WA-ACCNT_GRP = I_MAT_WA-ACCNT_GRP.
    ENDIF.
    MODIFY SOURCE_PACKAGE FROM SOURCE_WA index my_index.
    ENDLOOP.

    Hi Soniya,
    Have you tried debugging the report.
    After the ENDLOOP of  (LOOP AT SOURCE_PACKAGE ... ), is the internal table SOURCE_PACKAGE updated properly with required data.
    Now you have to update the database table using this internal table. So you have to use MODIFY statement. Also try calling the COMMIT WORK statement after the statement for Modifying the DATABASE TABLE using the INTERNAL TABLE SOURCE_PACKAGE.
    Regards
    Abhishek

  • G/L Account Group field in FI

    HI all,
    I need a report based on the G/L account group from ECC. in BI. I have searched all the datasources in FI like AR ,AP and GL ,but couldn't find the datasource which has G/L account group field.
    Actually my requirement is I need to pick some specific G/L accounts based on G/L account groups.I found the G/L accounts and chart of accounts but not the G/L account group.
    Thx

    Hi Srikanth,
    Thanks for reply,
    You  are right we need to load hierarchy for G/L then we can see all the G/L's for all G/L groups.
    I have one more question when I check in RSA3 for the G/L account numbers, I could not find them.
    I am using the datasource fi_gl_4 and in rsa3 I can see 1000 records data and when I put filter on G/L account and search for the G/L number I needed I cant see it, but it is there in the functional transaction(f.01)?
    How to check for the required G/L's in rsa3 ?
    Thx

  • In which tables the GL  account group  field KTOKS

    Hi,
    From which tables the GL  account group  field KTOKS  get
    Regards,
    Siva

    hi
      DKOKS                            Open Item Account Balance Au
      DSKOS                            Balance Audit Trail
      SKA1                             G/L Account Master (Chart of
      T077S                            G/L account groups
      T077Z                            Account Group Names (Table T
    regds
    laks.

  • I need HELP! I want to populate fields from a data connection...

    I am new to livecycle and am having problems making this work...
    I have an xml data table that is 5 columns wide and 1000 rows deep. (So too much data for list boxes)
    The data connection comes in looking like this:    - DataConnection
                                                                                   - (Ordered Group)
                                                                                        -Row
                                                                                              -(Ordered Group)
                                                                                                    Job
                                                                                                    Customer
                                                                                                    Part Number
                                                                                                    Rev
                                                                                                    Description
    When I pull Row into the form it makes a subform with the 5 fields as above.
    When I preview this it automatically pulls in the first record from the data source...I want to be able to fill in Job manually and have the other
    fields automatically pull in the appropriate information from the correct row in the data source. I have not been able to do this! Can anyone
    help me?
    Thank You,
    CLC

    Hello,
            I am sorry to say that, i felt hard in understanding the requirement. Can you please pass over the working copy to my email address [email protected], i try to get what you are looking for.
         Please find a sample that you can download from the link below, which demonstrates populating fields from a data connection. please take a look at it and i hope this will help you.
    https://acrobat.com/#d=5TstZ2VeptoSs6IAZ*81Yw
    thanks,
    Rajesh

  • G/L Account Group hierarchy (from KDH3 Controlling)

    We need to load the GL Account Group hierarchy from ECC6.  It's the version that's displayed by KDH3 (Controlling).
    Is there an extractor that can be used for this purpose?
    Regards,
    Frederick

    HI  Frederick
    Check this DS 0GL_ACCOUNT_T011_HIER
    click on available hierarchy from OLTP button under hierarchy selection tab
    Regards
    Anindya

  • Customer -Account group Field Status

    Hi
    I trying to make "Regional Structure Group" field in the customer master as mandatory.but iam unable to see the above mentioned field Customer -Account group Field Status.can anybody tell me how to bring that field in the  Customer -Account group Field Status so that i'll make it as required entry

    Hello Karthikeyan,
    The field REGIONAL STRUCTRAL GROUPING is in the General data of the Address tab.
    You can maintain it in OBD2
    Select the  Account group in OBD2 and click on the General tab----->Address ....
    In the second page you can find that field and then maintain as per your requirement.
    Regards,
    santosh

  • CHANGE OF ACCOUNT GROUP IN VENDOR MASTER

    Dear cons
    I created a vendor through t-code- XK01 & the accouint group is domv( domestic). I want to change the account group to IMPV( imported). In change mode(XK02) THE ACCOUNT GROUPING FIELD IS NOT AVAILBLE. PL. SOLVE IT.

    HI,
    GO TO XK07
    Enter Vendor code,then press Enter, Then enter new Account Group.
    System will allow new account group if both the account groups have been assigned same number range otherwise it is not possible.
    Regards
    Manish Joshi

  • 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

  • No G/L account selected for Asset Account in Business Partner Master Data

    Hi All,
    When i tried to raise A/P invoice for an Asset Item the system is raised the following error"  why?
    " No G/L account is selected for Asset Account in Business Partner master data "
    thanks
    SV Reddy

    hi Giri,
    When you choose from list against the Asset Account in the business partner master data it is only displaying the Trade Creditors Account domestic and foreign acounts only.  which one to choose in this case?  i presume trade creditors account is the one to choose.  but what is the logic for asset items to choose this Trade Creditors Account?   Or  else can we create a separate control account for purchasing the Asset items?  what is the logic again here choosing a separate account through option create new ?
    thanks
    SV Reddy

  • Abap logic not fetching multiple rows from master data table

    Hi
    I just noticed that my logic is fetching only 1 row from master data table.
    ProdHier table
    PRODHIERACHY            Level
    1000                                  1
    1000011000                      2
    10000110003333              3
    10000110004444              3
    '10000110005555              3*
    logic only fetches one row of level 3, I would like to fetch all level 3 rows.
    DATA: ITAB type table of /BI0/PPROD_HIER,
          wa like line of ITAB.
    Select * from /BI0/PPROD_HIER INTO wa where /BIC/ZPRODHTAS = 3.
    IF wa-PROD_HIER(10) = SOURCE_FIELDS-PRODH2.
         RESULT = wa-PROD_HIER.
         ELSEIF wa-PROD_HIER(5) = SOURCE_FIELDS-PRODH1.
         RESULT = wa-PROD_HIER.
    ENDIF.
    ENDSELECT.
    thanks

    Hi,,
    I have implemented the logic in end routine and it still reads only the first row.
    I am loading only PRODH1 and PROD2 but now I want to get all values of PRODH3 from the master data table.
    The first 5 values are PRODH1 and first 10 values belongs to PRODH2.
    Whenever PRODH2 = 1000011000 in source I should get the following values
    10000110001110
    10000110001120
    10000110001130
    I have multiple rows of 1000011000 so my result should be
      1000011000               10000110001110
      1000011000               10000110001120
      1000011000               10000110001130
    DATA: ITAB type table of /BI0/PPROD_HIER,
    wa like line of ITAB.
    data rp type _ty_s_TG_1.
    Select  * from /BI0/PPROD_HIER INTO table itab where /BIC/ZPRODHTAS = 3.
    LOOP AT RESULT_PACKAGE INTO rp.
    read table itab into wa with key PROD_HIER(5) = rp-PRODH1.
    IF sy-subrc EQ 0.
         rp-PRODH3 = wa-PROD_HIER.
         ELSE.
    read table itab into wa with key PROD_HIER(10) = rp-PRODH2.
    IF sy-subrc EQ 0.
         rp-PRODH3 = wa-PROD_HIER.
    ENDIF.
    ENDIF.
    MODIFY RESULT_PACKAGE FROM rp.
    ENDLOOP.
    Edited by: Bhat Vaidya on Sep 10, 2010 11:27 AM
    Edited by: Bhat Vaidya on Sep 10, 2010 11:37 AM

  • 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.

  • Currency translation - not picking up currencies from master data

    Hi,
    We have a currency translation defined for a key figure. We've defined a variable for users to select target currency. 0currency is set to pick up from master data, but the input help on the variable is only showing currencies from infoprovider. I debugged the query and it is trying to get the currencies from the cube. Any setting that I do or update?
    We're using BW 7.3 SP10 on HANA.
    Sonni

    HI
    Once check in the BEx tab of that IO, there select the f4 option.
    Regards,
    Sunil.

  • FI-AP  Add  field of master data vendor for reporting of vendor

    Hi,
    I have to add the field LFA1-BRSCH (industry) into layout output reports for suppliers:
    S_ALR_87012082
    S_ALR_87012093
    S_ALR_87012103
    I have already read the note 984305 - Line Item: Definition of special fields (T021S), but does not help me because it does not allow to enter fields of master data vendor
    But  I 've found the extension RFKRRANZ, but I do not know what to enter as a code.
    Has anyone ever used or even if it is used on your systems could send me the code?
    Any assistance would be greatly appreciated.
    Eric

    Hi,
    if someone can affect, the answer SAP  such enhancement is not possible for teh reports:
    S_ALR_87012082
    S_ALR_87012093
    S_ALR_87012103
    But only transactions: FBL1N/FBL3N/FBL5N or, as of ERP2004, FAGLL03.
    Best Regards.
    Eric

  • Web report data provider change from Master data table to InfoCube

    hi Experts,
    I have created one report on top of multiprovider but in the selection screen when i check the values for a variable I came to know that data is coming from master data table and not from data provider(InfoCube).Can any one help to change the data selection from master data table to data provider(InfoCube) and i am sure that there is no ODS involved in the multiprovider.
    Thanks in advance
    With Regards,
    Bala

    Hello,
    If u are using Analyser then just put a Analysis Grid on the output of the query(should cover all the rows and column) , click on the grid and put the dataprovider. and do auto fit.
    Rohit

Maybe you are looking for

  • Easy and working firewall.

    Someone may find this one useful, it is a little script that configure the iptables with easy. No need of fancy GUIs and dead easy. A nice simple script. chown it root:root chmod it 744 Edit, run the script, repeat when needed. #!/bin/sh # firewall.s

  • 8.2.1 or 9.2.1?

    G5/10.4.11/iTunes 7. Just using iTunes for music to burn CD's. Don't have iphone,ipod,etc dont want to sync iphoto/watch TV etc - just burn CD's. Is it worth upgrading to version 8 or even 9? What advantages..?

  • PS CS5 Trial Version Crashing

    I've been using the trial version for 15 days without any problem.  Now when I hit shft, commd, s to save it closes.  Tried re-install.  Tried turning off openGL.  Here's the log: Process:         Adobe Photoshop CS5 [2412] Path:            /Applicat

  • How to use a calc script to work around Implicitly share members

    I have a hierarchy which has some implicitly shared members( one child per parent) For example my cost center dimension is built the following way CostCenter | |-------------------CostCenter1 | | | |--------------Member A( child of COst Center 1) ---

  • Repair

    having trouble with my front camera on my iPhone 4 and want it repaired ? any ideas on where to send it or what to do??