Enhancement-ABAP Code-Customized Field issue

Hi Experts,
Currently I am working on the BW3.5 version. We are using the standard SRM standard extractor 0BBP_TD_SC_1 and we enhance same extractor(populate the filed through CMOD - ABAP Code) with one customized field also. We are having issue on the customized field data which post from SRM system. I have verified the field value and value is fine in RSA3 in SRM source system. But while posting into the BW(PSA itself), its loading correct & wrong value. When i check the PSA for the particular load, It looks little strange. In the PSA, I can see correct value on my first record of the same SC and then next records has incorrect value of the same SC. Currently I am using the ODS as a data target. So finally i am getting the incorrect value on the customized field.
Ex Scenario:
Ex Customized Field: ZORGID
In SRM source system RSA3 Extractor Checker value:
Shopping Card No: 100
Customized Field: ZORGID=1
Shopping Card No: 200
Customized Field: ZORGID=2
In BW posting-PSA:
Shopping Card No: 100
Customized Field: ZORGID=2
Shopping Card No: 200
Customized Field: ZORGID=2
At the same time, if i do the selective deletion of the particular Shopping Card or group of SC in BW and do the full repair, then it gets a correct ZORGID=1 for the same Shopping Card.
I strongly believe, something wrong in the ABAP code. But when we tried to debug the customized filed value in RSA3. The value is fine. so we unable to trace out the issue. Please help me to fix the code. Thanks in advance.
CMOD ABAP Code:
*Populate approver ID even though it doesn't require approval this is required to make sure BW reports have restrict access to respective Org Unit approvals only
IF l_s_bbp_sc-approver_id IS INITIAL AND l_s_bbp_sc-itm_guid IS NOT INITIAL.
CALL FUNCTION 'Z_BBP_FIRST_APPROVALGET'
EXPORTING
iv_header_guid = l_s_bbp_sc-guid
iv_itm_guid = l_s_bbp_sc-itm_guid
IMPORTING
approver_no = l_s_bbp_sc-approver_id
EXCEPTIONS
no_data = 1
OTHERS = 2
IF sy-subrc 0.
ENDIF.
ENDIF.
To ensure that the Org Unit passed in into the field
l_s_bbp_sc-zzapprov_orgunit belongs to the Actual Level 1
Budget Owner and not any other manager such as Added Approver.
CLEAR : ls_ln_approvers, l_userid, lv_bpartner_guid.
DATA : lv_f_apprv_part TYPE BU_PARTNER.
READ TABLE lt_ln_approvers INTO ls_ln_approvers
WITH KEY INITIAL_INDEX = '0000000001'.
IF sy-subrc EQ 0.
MOVE ls_ln_approvers-approval_agent+2(12) TO l_userid.
CALL FUNCTION 'BP_CENTRALPERSON_GET'
EXPORTING
iv_username = l_userid
IMPORTING
ev_bu_partner_guid = lv_bpartner_guid
EXCEPTIONS
no_central_person = 1
no_business_partner = 2
no_id = 3
OTHERS = 4.
IF sy-subrc = 0.
CALL FUNCTION 'BUPA_NUMBERS_GET'
EXPORTING
iv_partner_guid = lv_bpartner_guid
IMPORTING
ev_partner = lv_f_apprv_part.
ENDIF.
ENDIF.
We get the BP number of the first Budget Owner 1
Here, we superseed the field l_s_bbp_sc-approver_id
whereby it may be wrong due to Added Approver.
IF l_s_bbp_sc-approver_id IS NOT INITIAL.
IF lv_f_apprv_part IS NOT INITIAL.
IF l_s_bbp_sc-itm_guid IS NOT INITIAL.
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
act_otype = 'BP'
act_objid = lv_f_apprv_part
act_wegid = 'EBP-UP'
act_begda = sy-datum
act_endda = sy-datum
act_tdepth = 4
TABLES
result_tab = lt_result_tab
EXCEPTIONS
no_plvar_found = 1
no_entry_found = 2
OTHERS = 3
IF sy-subrc = 0.
READ TABLE lt_result_tab INTO ls_result_tab WITH KEY
otype = 'O'.
IF sy-subrc EQ 0.
l_s_bbp_sc-zzapprov_orgunit = ls_result_tab-objid.
ELSE.
ENDIF.
ENDIF.
ENDIF.
Thanks,
RR

Hi Experts,
Any suggestions. Thanks.
Thanks,
RR

Similar Messages

  • Alternative Account number - using as a custom field/Issues in reports pull

    Hi All,
    Requirement:
    Create a new field in the GL master that will link through to a new 8 to 10 character new Chart of Accounts (COA).
    We are presently using the "Group Account number" field from the GL master for reporting purposes through a Group COA. So this won't be available for our new purpose. Instead of creating a custom field and pulling the data, I'm thinking to use Country Chart of Accounts to fill this gap by using "Alternative Account Number" in GL Control data tab.
    I created a new Country COA and assigned it to Operational COA. Created new GL account (FS00) and also created a new Country Chart of Accounts (FSP0) at Chart of Accounts level and assigned this to the created GL (FS00). In this process I got couple of issues
    1) System didn't allow me to assign Country COA GL if already has the balance, and tried to change this error message in OBA5 without success. How can I add newly crated Alternative a/cs to the existing (balanced) GL A/cs?
    2) This time I created brand new GL a/c and added the alternative a/c and created new Financial Statement Version (FSV) assigned the newly crated a/cs but I couldn't run the reports on this new COA, getting following error message "Company codes and charts of accounts entered are incompatible" when executing F.01/F.08.
    3) May be silly to ask - why we are not maintaining the Alternative a/c at Company Code level (FSS0)? Why we are only maintaining at Chart of Accounts level (FSP0)?
    Would be glad if any one touch this area deep enough to understand easily

    Hi
    The system will update the amount at company code level GL only. You can post the entries at company code gl only, no option to post the transaction figures at chart of accounts level. So the group COA or country level COA will pick up the transactional data from the GL at country level. Remaining level GLs are link with the country level COA.

  • Needs sample ABAP code for field routine

    Dear Expert,
    There is a field "Pay Scale Group" in my DSO which stores the data in the format
    AA1/B1/CCC2/DD2/EEE1, A1/BB2/CC2/DDD3/EE2 etc. These data has to be transferred to
    InfoCube where "pay Scale Group" in the InfoCube will store the data like EEE1,EE2 etc.
    I need to write a field routine on the transformation between DSO and Cube.
    Can any one please help me with the sample ABAP code for this scenario.
    Some more examples for better understanding of the requirement:-
    Data in DSO(Source)            Data in Cube(Target)
    ===================            ===================
    AA1/B1/CCC2/DD2/EEE1            EEE1
    AAA1/BB2/CC1/DDD3/EE2           EE2
    A2/BBB2/CC2/DDD3/EEE5           EEE5
    AA2/BB1/C1/DDD3/EE3             EE3
    A3/B1/CC2/DDD1/EE4              EE4
    Many thanks in advance.
    Regards,
    Prakash
    Please do not dump your code requirements in SDN
    Edited by: Pravender on May 18, 2011 11:37 AM

    Hi,
    You can use the following code :
    Suppose the technical name of the field coming from DSO is ZPAY_SGRP.
    And also for example let me take one record, that is ZPAY_SGRP = AA1/B1/CCC2/DD2/EEE1 .
    My assumption is that there will always be 4 '/'.
    In the field routine write the below code
    data: V1(5) type c,
              V2(5) type c,
             V3(5) type c,
              V4(5) type c,
             V5(5) type c.
    data : VAR1 TYPE /BIC/OIZPAY_SGRP.
    split VAR 1  at '/' into V1 V2 V3 V4 V5.
    result = V5.
    V5 will be having the characters after the last '/' .That is V5 = EEE1.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh
    Edited by: Ashutosh Singh on May 17, 2011 3:53 PM
    Edited by: Ashutosh Singh on May 17, 2011 4:17 PM

  • Location of ABAP codes - customed programs

    Dear All,
    Would you assist to confirm my understanding that,
    any ABAP codings/developments, ABAP programs  (customed programs) all store in /usr/sap/trans
    and /usr/sap/trans only.
    We are a very small SAP shop with just 1 developer and little developement,
    so if I need on older version of an abap program,
    I can just restore /usr/sap/trans from backup tape.  This is DEV box only.
    Please help.
    Thank you.
    Edited by: elizabeth ly on Apr 13, 2011 7:08 PM

    Hi John,
    There was a problem with our SAP DEV hardware server (Win 2003),
    so we bring our SAP DEV system and put it on a VM temporary.  During this time, there was 1 brand new customized ABAP program created while on VM. 
    Now that we finished preparing with the new SAP DEV hardware, we take our DEV off from VM.
    But, what we are missing is the 1 brand new customized ABAP program.
    I figure if I restored from the /usr/sap/trans, the new codes would be there.
    Please confirm my understanding.
    Thank you.
    Elizabeth

  • Log Subscription Custom Fields Issue

    Good day.
    We currently use the IronPort S670.  In the the Log Subscription, section, we are trying to get a custom Log Subscription that uses the Access Logs.
    Bellow is I have inputed in the Custum Fields area of the Log Subscription:
    Date %v|Time %V|Unix_TimeStamp %t|Client_IP %a|Client_Source_Port %F|Destination_Port %p|Source_IP %k|Source_Hostname %d|Source_CPU_Name %N|Request_URI %U|Full_URL %Y|Cookie_Header %C|Referrer %<Referrer:|Forwarded_for %f|Elapsed_Time %e|Bytes %B|Request_Size %q|MYEND|
    I do get all the fields and the format I requested in my log files, however, my issue is that is adds the default logs to it it as well. 
    Sample of log file output: In bold, the custom fields I requested, the rest before, is the default log output.
    1335539582.805 359 10.159.56.158 TCP_CLIENT_REFRESH_MISS/200 6699 POST http://ca.mg5.mail.yahoo.com- DIRECT/ca.mg5.mail.yahoo.com text/plain DEFAULT_CASE_11-PHAC_Access-PHAC_Access-NONE-NONE-NONE-DefaultGroup <IW_mail,-,"1","-",-,-,-,"1","-",-,-,-,"-","1",-,"-","-",-,-,IW_mail,-,"-","-","Yahoo Mail","Webmail","Unknown","-",149.28,0,-,"-","-"> - Date 2012-04-27|Time 15:13:02|Unix_TimeStamp 1335539582.805|Client_IP 10.159.56.158|Client_Source_Port 4934|Destination_Port 80|Source_IP 98.136.145.154|Source_Hostname ca.mg5.mail.yahoo.com|Source_CPU_Name ca.mg5.mail.yahoo.com|Request_URI ws/mail/v2.0/js?|Full_URL http://ca.mg5.mail.yahoo.com/ "Cookie: B=0nlkn2p7dairm&b=4&d="|Referrer -|Forwarded_for -|Elapsed_Time 359|Bytes 8756|Request_Size 2057|MYEND|
    Is there a way to have the custom log subscriptions, to only show the custom fields selected?
    Thank you for all your assistance.
    Cheers

    To be clear, you want an AccessLogs subscription, but with none of the defaults, correct?
    If you use a W3C log instead of an accces logs, you can pick which fields you can use, so you could remove them all, and just add the ones you want using the custom fields.
    I'd try creating a new log subscription, pick W3C Logs as the log type, pull out all of the other log fields and put your string in the Custom Fields box...
    Ken

  • Enhancement in VA01 (Custom field addition in Additional Tab at header)

    Hi Experts,
    I have to develop some custom fields in tcode VA01 at header level in addtional data B tab. I know that i can use access key and develop the screen 8309 of program SAPMV45A and for that i have to provide access key. But i dont want to use access key.
    Is there any screen exit or badi through which i can develop the screen in additional data B tab in VA01. Please provide me suggestion.
    Thanks in advance.
    Regards,
    SURYA BASU

    Hi
    I don't know other solution. Provide a key in my opinion is not a problem. You must do it when create your own VOFM subroutines in your customer range number. if your boss or your client has doubts, ask him/her to see the SAP Note 381348 - Using user exit, customer exit, VOFM in SD, when it says:
    At the beginning of the R/3 development the SAP Basis did not offer
    technologies for exits yet, nevertheless many customers wanted to implement
    their own functions, checks, and so on. Thus, in the SD area, includes were
    delivered like, for example, MV45AFZZ. This include contains some empty
    FORM routines (user exits) to which you can go from the respective
    processing programs.
    and
    Changes to user exits in SD are MODIFICATIONS,
    since the original of an object belongs to SAP (thus when you change a user
    exit an SSCR registration is also required).
    Why this exits belongs to SAP, see Note 16466 - Customer name range for SAP objects.
    I hope this helps you
    Regards
    Eduardo

  • PR Custom Fields Issue

    We have added a field RJCT_FLG in CI_EBANDB include of EBAN table and
    provided the user a Custom Tab in ME52N in order to rejet the
    particular PR item in case if it is finally released. On save we are
    updating the EBAN table to short close that item.
    Now the condition we have put is Buyer should reject  the PR only when it is fully released but once PR is released it is not allowing the Buyer to reject the PR through ME52N. Can any body help in this because the requirement is such.
    Thanks & Regards.
    Tarun.

    To be clear, you want an AccessLogs subscription, but with none of the defaults, correct?
    If you use a W3C log instead of an accces logs, you can pick which fields you can use, so you could remove them all, and just add the ones you want using the custom fields.
    I'd try creating a new log subscription, pick W3C Logs as the log type, pull out all of the other log fields and put your string in the Custom Fields box...
    Ken

  • ABAP code which will use function module during field mapping in LSMW

    Hi,
    During field mapping in LSMW, for one of the field called field, I want to use a function module 'QF05_RANDOM_INTEGER', which will generate random numbers and map that random number to that field.
    How do I write ABAP code which uses function module, during filed mapping for a particluar field in LSMW ?
    Please help...
    Regards,
    Tushar.

    Hi Tushar,
    You can write in FORM ROUTINE and LSMW.
    I hope you know how to write ABAP code at field level.
    If not ...
    Come to change mode->select the field->Rule->ABAP Code
    write a perform statement in ABAP code at field level.
    <b>PERFORM test</b> using val
                 changing valu.
    Go to Utilities(at menu)->switch layout-> extras ->select Layout->check Form routine-> it will display a FORM Routine... at bottom
    this is the place where you can write some code for
    <b> FORM test</b> using value
              changing value1
      FM call....
    .ENDFORM  
    Get the value1 returned and use for the Field population.
    Reward points if this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • CRM 7.0 / IS-U: adding custom fields to Business agreement for replication

    Hello Experts!
    We're working on replication of custom fields from IS-U to CRM 7.0.
    Can you help me with clarification of my understanding of these questions..?
    1) CRM/IS-U mapping tables for buag_main:
    Business Agreement(BUAG_MAIN) is a BO in CRM that corresponds to CRM table CRMM_BUAG and to Contract account in IS-U table FKKVKP.
    Table FKKVKP were enhanced with some z-fields,
    so we are going to enhance corresponding CRM table CRMM_BUAG (or CRMM_BUAG_H) with that new fields..
    But we see that these CRM and IS-U tables have far not the same field structures..
    So, the question: Which crm and is-u tables i should look, enhance and replicate for Business agreement?
    2) Access to Business agreement with possibility to add custom field:
    I couldn't find in Web UI where i can directly edit profile of Business Agreement..
    I've found just access to assignment block "Business agreement" on Account's profile overview page..(Role ServicePRO; Account details).
    There I used AET to add custom field..but I faced with problem when the 1st popup appeared: there was no enhanced object "Business Agreement"..
    Also in role "Utilities IC Agent" i've found "business agreement" profile but there I don't see buttons for adding custom fields..
    So, the question is: Where I can access Business agreement profile to enhance it with custom fields for replication with IS-U?
    3) CRM/IS-U data exchange functions:
    I tend to use tcode CRMC_BUT_CALL_FU:
    for CRM inbound event of BUAG object  - FM CRM_BUAG_MWX_PROCESS_EXT_STRUC..(as template).
    Question: Am I right that it fits my requirement to replicate custom fields from IS-U to CRM?
    Please tell me if you need more information..
    Looking forward to your answers.
    Thank you a lot in advance!
    Kind regards,
    Evgenia

    Hi Gobi,
    Thank you for advice. But:
    I've created fields not by using AET - I used documentation that Nicolas suggested me above.
    I've enhanced tables and structures that were mentioned there with my z-fields for both sides (CRM and ERP).
    Also I looked CRMC_BUT_CALL_FU for CRM Inbound BUAG_MAIN - corresponding standard FMs are marked for call.
    Any ideas?
    Thanks in advance.
    BR,
    Evgenia

  • Not able to remove the ABAP code from Transformation

    Hello Experts,
    We have transformation for DSO in that for one infoobject, field routine is written, Break Point is hard coded there and it's move to production. Now we are trying to remove that break point from development and then move it production.
    we are doing following activity to remove the break point.
    1. Open the transformation.
    2. Open the field routine.
    3. Going to ABAP code in field  routine.
    4. Remove the hard coded Break Point from ABAP code.
    5. Saving the code.
    6. It's taking to again filed routine window.
    7. We close the window and activate the transformation.
    8. When again check the ABAP code in field routine then it shows hard coded Break Point again.
    9. Not able to remove the hard coded break point.
    Can anyone know how to do this.
    Help will be appreciated.
    Thanks

    Hi,
    As pointed above, after point 6 don't simply close the window but click on Transfer Value and then activate your transformation. Refresh the system and check again.
    Regards,
    Arminder

  • Abap Code TO ENHANCE DATASOURCE with KEY FIELD OF SOURCE TABLE

    Dear Friends, Please help me to resolve this important issue at my end.
    <b>Requirement</b>:  enhance the STRUCTURAL data source which is
    based on the table VISTSU , now this table has a <b>key INTERNO</b> (Data Element : SECAINTRENO) which i want to enhance in datasource 
    SGONR = STRUCTURAL NUMBER present in extract structure of datasource
    Solution: I am not able to see any records for zzinterno enhance field in datasource rsa3 (Extractor CHECKER). Can u help me correct the ABAP code or tell me the way to pull the records for ZZINTERNO from VISTSU table.
    Thanks
    Poonam Roy
    ABAP Code
    data: l_s_REIS_STRUCTURAL_ATTR like REIS_STRUCTURAL_ATTR.
    case i_datasource.
    WHEN '0STRUCTURAL_ATTR'.
    loop at C_t_data into l_s_REIS_STRUCTURAL_ATTR.
    l_tabix = sy-tabix.
    clear  I_VISTSU .
    select single * from VISTSU  into i_VISTSU  where SG0NR = l_s_REIS_STRUCTURAL_ATTR-SGONR.
    if sy-subrc = 0.
    l_s_REIS_STRUCTURAL_ATTR-ZZINTRENO = I_VISTSU -INTRENO.
    modify C_t_data from l_s_REIS_STRUCTURAL_ATTR index l_tabix.
    endif.
    endloop.
    endcase.

    Try the below code.
    data: l_s_REIS_STRUCTURAL_ATTR like REIS_STRUCTURAL_ATTR.
    data: temp_interno like VISTSU -INTRENO.
    data:  h_tabix LIKE sy-tabix.
    case i_datasource.
    WHEN '0STRUCTURAL_ATTR'.
    loop at C_t_data into l_s_REIS_STRUCTURAL_ATTR.
    MOVE SY-TABIX TO H_TABIX.
    clear temp_interno.
    select single INTERNO from VISTSU into temp_interno where SG0NR = l_s_REIS_STRUCTURAL_ATTR-SGONR.
    if sy-subrc = 0.
    l_s_REIS_STRUCTURAL_ATTR-ZZINTRENO = temp_interno.
    endif.
    modify C_t_data from l_s_REIS_STRUCTURAL_ATTR index H_TABIX.
    ENDLOOP.
    ENDCASE.
    Regards, Siva

  • SAP Query Custom Field with ABAP Code

    Hi All,
    I have a custom field in my SAP query which has some ABAP code under it. The code finally writes some value to a variable. My question is do i need to explicitly link the variable in the ABAP code to the custom field OR it's done automatically. For some reason i don't see any value for this custom field. Thanks.

    Thanks Sandra

  • Enhancement for COR1,COR2,COR3 -  PPCO0020 - to add custom field on screen

    Hello Experts,
    My requirement is to add a custom tab and in that a custom field for TCODE COR1. I have done this by creating a project from cmod for enhancement PPCO0020.
    Added the custom field to table AUFK and structure CAUFVD. the field name is KDAUF_AUFK1 and on the custom screen created an input field from structure, so the screen field is CAUFVD-KDAUF_AUFK1.
    Now when I try to code the Exit  EXIT_SAPLCOKO_006 with the below code
    E_COCI_AUFK-KDAUF_AUFK1 = KDAUF_AUFK1.  
    it does not store the data into the table AUFK.
    Can any one throw some light on this.
    Thanks,
    Jaya.

    A similar job explained in the document here. IWO10018: User Fields in Maintenance Order   Draw clues for your issue from the things mentioned in Step3 of this document for storing the values in the tables. Here tables are equated not fields.

  • Enhancement of component ERP_H with a custom field in the Web UI

    Hi,
    I'm facing an error when enhancing the component ERP_H with a custom field in the web UI.
    I've followed the steps mentioned in the pdf document called "Enhancement Options for the Lean Order Interface" (Note
    1224179):
    I´ve done a enhacement on ERP_H component.
    I added a field to the view Headerdetail called "ZZCCTYPE1", but when I set a value in UI, I haven´t read this field in abap code.
    The SET method (SET_ZZCCTYPR1) in the context node is ok, in debug I see that the method current->set_property, is working fine.
    I've tried to read the atribute with lr_entity->get_property_as_string ( 'ZZCCTYPR1' ), but doesn´t work. When I read other "standard field", the statement is ok and it has value.
    When I set the value of the field from ECC (VA01/VA02), it is kept by the system.
    Could anybody help me?
    Thanks in advance,
    Regards,
    Andrea Ricci

    Hi,
    To add a new field, you have to first create it through T-Code EEWB where in you create a project, create extension  which is assigned to a business object and create the new field through wizard - specifying the field name , type and length.
    Once this is done, you can check the new field coming up in available fields for the relevant component's view in Tcode BSP_WD_CMPWB.
    Hope this helps you out.
    Cheers
    Ravindra Valy
    "Award Points if it is helpfull"

  • Enhancing the component ERP_H with a custom field in the web UI

    Hi,
    I'm facing an error when enhancing the component ERP_H with a custom field in the web UI.
    I've followed the steps mentioned in the pdf document called "Enhancement Options for the Lean Order Interface" (Note
    1224179):
    I´ve done a enhacement on ERP_H component.
    I added a field to the view Headerdetail called "ZZCCTYPE1", but when I set a value in UI, I haven´t read this field in abap code.
    The SET method (SET_ZZCCTYPR1) in the context node is ok, in debug I see that the method current->set_property, is working fine.
    I've tried to read the atribute with lr_entity->get_property_as_string ( 'ZZCCTYPR1' ), but doesn´t work. When I read other "standard field", the statement is ok and it has value.
    When I set the value of the field from ECC (VA01/VA02), it is kept by the system.
    Could anybody help me?
    Thanks in advance,
    Regards,
    Andrea Ricci

    Hi Pooja,
    When you created your custom views, did you bind the view context nodes to the corresponding context nodes of your component controller?
    From the exceptions you reported it seems that this binding is missing.
    To create this binding, you can right click on your view context node , choose "Create Binding" and bind it to the context nodes of your Component Controller.
    Hope this helps.
    Regards,
    Nisha

Maybe you are looking for