SOAP TO RFC . Issue in updating the fields in BAPI

Hi XI experts ,
This is SOAP TO RFC scenario .
THe Source is an dtd (create PO ) schema provided by external partners .
The Target is : BAPI : BAPI_PO_CREATE1 , a standard BAPI used to craete PO in SAP .
I need to map the below source fields to the  BAPI Fields:
1.     ReferenceTypeCodedOther>ACC_STR</ReferenceTypeCodedOther> then <RefNum>1000</RefNum> ->
2.     <ReferenceTypeCodedOther>G_L_ACCT</ReferenceTypeCodedOther> then RefNum>5423100</RefNum>
3.     <ReferenceTypeCodedOther>COST_CTR</ReferenceTypeCodedOther> then <RefNum>313</RefNum>
4.     ReferenceTypeCoded>AccountCategory</ReferenceTypeCoded> then <RefNum>ZNCC</RefNum>
-I have changed the context of the   "Ref NUm" to -ReferenceTypeCoded ( Main Node)
2. Lets take an example of 2 :"
iF <ReferenceTypeCodedOther> = G_L_ACCT , Then RefNum (5423100<)  -> Leading zero function (to make it 10 digits) =GL_ACCOUNT field of BAPI
here i have used , if ReferenceTypeCodedOther  <> SUBSTRING (0-7)  <Equals text> G_L_ACCT then  <RefNum>  LeadingZero Function with constant 10 -> GL_ACCOUNT (Field of BAPI)
Similarly this logic should get applied for all the other 3 conditions
But when i used the substring , it throws an error : Error:
Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range: 1] in class com.sap.aii.mappingtool.flib3.TextFunctions method substring[,
I tried creating this Java function: to extract the string, but this throws an error of Java container
Does anyone hve a simple solution . Appreciate your input.
Thanks,
Vara
public String Extract_String(String a,Container container){
   //write your code here
// u201Cau201D  is your input that is reference field
boolean flag=false;
if ((a.contains("ACC_STR"))|| (a.contains("G_L_ACCT "))||( a.contains("COST_CTR"))||(a.contains("AccountCategory")))
flag = true;
return flag;
with Java.lang.*   --- > imported  , but this throws an error

Hi Baskar ,
The Issue got solved , I used a  java function : To exatrct the string comparing the : String value which I provide as Input .
This function inturn consolidate the value and will pass it one context (PO_ACCOUNT ) of BAPI .
I used this code by changing the  CONSTANT :(VALUE ) for other 3 conditions  mentioned in my query.
Java function:
For Cost Centre(COST_CTR) field of BAPI:
public void Value(String[] a,String[] b,ResultList result,Container container){
Java IMport :java.lang.String;java.lang.*;
//write your code here
int m= a.length;
int n= b.length;
String s="COST_CTR";
for (int i=0; i<m ;i++)
if(a<i>.equals(s))
result.addValue(b<i>);

Similar Messages

  • Issue in Updating Date Fields in JDBC

    Hi Experts ..
      I am having issues in updating date fields in Oracle Database.
    My Sender Sends date in format 2007-05-19T14:34:55.0000000+02:00
    Can any one please suggest me how does the above format can be updated in JDBC with format 2007/05/19
    Thanks !

    Hi,
    See this Scree shot
    http://img517.imageshack.us/my.php?image=16324662pf7.jpg
    Take the Substring Function From Text Functionsand mention the position from 0 to 10 to take the Date alone from the Whole String which is getting in Source Field.
    And after that apply the Transform date Function fron Date Functions and mention the source date format and the target date foramt that needs to convert into.
    REgards
    Seshagiri

  • Updating the field "relevant for POD" for customer in XD03 in R/3

    Hi All,
    Is there a way to update the field "relevant for POD" for newly created customer on XD03 in R/3 from CRM system. My requirement is customers will be created in CRM by interface from mainframe(legacy) system. Whenever a  new customer is created thorugh this interface in CRM, the mentioned POD field needs to be checked in R/3  and also this field is not available in CRM on BP transaction( as I have observed till now) causing my main issue otherwise I believe that BDOC will take care of it to move to R/3 system.
    Thanks in Advance.

    Hi,
    Dear AYAZ,
    as my knowledge " XD03 " is used for DISPLAY THE  CUSTOMER,you may ask particular SD Consultant for required changes.
    For changing the customer T.C is " XD02 " in Sales Area Section( SHIPPING Tab )you"ll find the Relevant for POD( Check Box ).
    Plz give points if you feel valuable.
    Regards
    CR Gupta

  • DYNP_VALUES_UPDATE not Updating the Field on my Dynpro

    Hi.
    I want to create a dynpro where two fields are. Field 1 allows the user to enter a customer number, field two shall come up with a number that is calculated somehow. The calculation can last up to 20 seconds, so I dont want to make the user waite for this number.. .he shall be able to work with the rest of the dynpro.
    Therefore I called the function that does the calcuiation like that:
    MODULE user_command_0100 INPUT.
      DATA: lv_guid_16 TYPE guid_16.
      IF kna1-kunnr IS NOT INITIAL AND kna1-kunnr <> gv_kunnr
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_16 = lv_guid_16.
        gv_taskid = lv_guid_16+8(8).
        CALL FUNCTION 'YDETERMINE_DEPOTDISTANCE' 
          STARTING NEW TASK gv_taskid
          PERFORMING receive_depent ON END OF TASK
          EXPORTING
            i_kunnr = kna1-kunnr.
      ENDIF.
    ENDMODULE. 
    The next piece of code shall get the returning value if the function wants to return its results.
    FORM receive_depent USING i_task TYPE clike.
      TABLES: d020s.
      DATA: dyname LIKE d020s-prog,
            dynumb LIKE d020s-dnum.
      DATA: BEGIN OF dynpfields OCCURS 1.
              INCLUDE STRUCTURE dynpread.
      DATA: END OF dynpfields.
      IF i_task = gv_taskid.
        RECEIVE RESULTS FROM FUNCTION 'YDETERMINE_DEPOTDISTANCE'
        IMPORTING
          e_depent         = kna1-yydepent
          e_accuracy       = gv_accuracy.
        MOVE 'KNA1-YYDEPENT' TO dynpfields-fieldname.
        MOVE kna1-yydepent TO dynpfields-fieldvalue.
        APPEND dynpfields.
        dyname = sy-cprog.
        dynumb = '0100'.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = dyname
            dynumb               = dynumb
          TABLES
            dynpfields           = dynpfields
          EXCEPTIONS
            invalid_abapworkarea = 01
            invalid_dynprofield  = 02
            invalid_dynproname   = 03
            invalid_dynpronummer = 04
            invalid_request      = 05
            no_fielddescription  = 06
            undefind_error       = 07.
        ASSERT sy-subrc = 0.
      ENDIF.
    Problem is: The DYNP_VALUES_UPDATE does not update the field on my dynpro at all. If I hit enter another time, then the field is provided by the value as another PBO will be processed. What is my mistake here?
    Regards
    Manfred
    Edited by: Rob Burbank on Oct 29, 2010 12:07 PM

    Hi Manfred,
    Replace all the DYNP_VALUES_UPDATE-related content by the following statement:
    SET USER-COMMAND 'xxx'.
    While DYNP_VALUES_UPDATE does update the fields, a roundtrip is not triggered so the content of the fields will not be refreshed. The SET USER-COMMAND does that.
    Hope this helps you!
    Cheers, Roel

  • USER EXIT or BADI to update the field in trx. ME41

    Hi guys,
    My requeriments is  update the field EKKO SUBMI of record when the trx. ME41 but can not find how to do it, the BADI ME_PROCESS_CUST the method POST not allowed me to meet user and not allow the update the field.
    Please help ...
    Thanks.

    Hi Ramana,
    Go to SPRO Transaction and follow the below path
    Customer relationship management>Transactions>Settings for Service Processes>Business Add-Ins and you will find 8 BADI's.
    Check these BADI's useful for you.
    Regards,
    Lijo Joseph

  • How to update the field of a Parent enity (field is not visibe on the Form) from a Child Entity in MSCRM 2013

    Hi All,
              I m new to CRM customization. I have requirement like this..
    I have 3 entities.. Entity1 , Entity 2 and Entity3.
    Entity1 is the parent of Entity2 and Entity3. Entity2 is the parent of Entity3 and child of Entity1 ..
    In Entity1 I have a field eg:product1 which acts as lookup for Entity2 field availableproducts.  Now in Entity2 I have a field the quantity of products which acts as lookup for Entity3 as given below.
    In Entity3: fields:;; products==Lookup of Products(Entity1)
                                  quantity == Lookup of Quantity (Entity2)
    Now from Entity3 I need to update the fields of Entity1 like I have field named Price which is not visible on the Entity3 Form  but when I access this field from javascript I m getting null exceptions since the field is not in the context of the Entity
    on which it is defined. How can I update the fields of the Parent Entity1 from child Entity3  and also update the quantity field on Entity2 which are not avialable on the Entity3 Form.
    Any help is appreciated
    Waiting for the reply..
    FayazSyed

    Hi,
    To do it in JS you need to use oData, as wrote above:
    to make this requests easer, i use a XrmSvcToolkit library (https://xrmsvctoolkit.codeplex.com/)
    Your code will be about this:
    /// <reference path="rtb_XrmSvcToolkit.js" />
    XrmSvcToolkit.retrieve({
    entityName: "Entity1",
    id: Xrm.Page.getAttribute("quantity").getValue()[0].id,
    select: ["my_FieldNeedToUpdate"], //Here are the name of your fields, which you want to select.
    expand: [""],
    async: false,
    successCallback: function (result) {
    FieldNeedToUpdate= result.my_FieldNeedToUpdate;
    errorCallback: function (error) {
    Error = error;
    FieldNeedToUpdate = FieldNeedToUpdate + 1; //Doing some work here
    var InputEntity =
    my_FieldNeedToUpdate: FieldNeedToUpdate //here are fields, witch you want to update
    XrmSvcToolkit.updateRecord({
    entityName: "Entity1",
    id: Xrm.Page.getAttribute("quantity").getValue()[0].id,
    entity: InputEntity ,
    async: false
    Here are more samples:
    https://xrmsvctoolkit.codeplex.com/SourceControl/latest#Samples/XrvSvcToolkit.Samples.updateRecord.js

  • How to update the field 'VBRK-ZUONR' of Billing Document Header(VF03)

    Hi Experts.
    I got a request to update the field 'VBRK-ZUONR' of Billing Document Header(T-code:VF03).
    At first i thought it might be a BADI or User-Exit case and looked up in Standard Program but found nothing.
    Thus i doubted if it was a configuration problem.
    I tryed to configure through transaction code "VTFA" "VTFL" "VTFF" and met another failure.
    Now i'm totally lost and hope for your advice,any information would be appreciated.
    The Billing Document is automatically generated from the posting of Outbound Delivery.
    Regards.
    Panda.

    Hi friends.
    I've found where point is.
    The include program 'RV60AFZC' contains a form named 'USEREXIT_FILL_VBRK_VBRP',
    in which the field 'VBRP-ZUONR' could be set through coding.
    In our system the codes had been changed once,which led to the misalignment that confused me yesterday.
    On the other hand,undoubtedly VTFL is available to configure the value of 'VBRP-ZUONR'.
    For more information plz refer to
    http://help.sap.com/saphelp_46c/helpdata/en/18/f62c7dd435d1118b3f0060b03ca329/content.htm
    Thanks again to all of you.
    Best Regards
    Panda.

  • How to update Tr code FB02   and update the field reference key1 (bseg-xref

    Can any body
    help me how to update   Tr code   fb02
    and  update the field  reference  key1 (bseg-xref1)  with the interest amount
    calculated.
    Below i have  written My  program  flow logic
    The program should read the open items i.e debit items in the customer account,
    Based on the  invoice date and customer payment terms  calculate the due date and then the  interest should be  calculated on that item based on the due date.
    Use the  transaction  fb02  and update the field  reference  key 1 (BSEG-xref1)
    with the interest amount calculated
    Only  consider  customers whose  interest indicator  knb1-vzskz = 'vk'.
    Interest is to be  calculated for every  30  days
    at the rate of  1% .please see example below.
    Document date is 01.01.2007
    for amount  1000SGD   payment  term  7  days
    It becomes  due  on  08.01.2007
    until  06.02.2007 you should not  consider  for calculation of interest
    SGD  on   7.02.2007 run you can consider this  item for interest calculation

    Hi Robert,
    Thanks for answering.
    I am looking at Ref 2 should flow automatically to clearing document from the accounitng document for billing.
    Ex: Billing document is created and accounted. Ref 2 is AB
    Now when receipt is accounted for this biling document this AB should flow automatically to Ref 2 field.
    Thanks
    NNS.

  • How to update the field  BSEG-BDIFF

    Hi to All,
    do you know some funciont module or BAPI that update the field BSEG-BDIFF ?
    Thanks a lot.
    Best Regards,
    Umb.
    Edited by: Umberto Panico on Jan 18, 2011 10:40 AM

    Hi,
    Please check these FM.
    G_FI_UPDATE
    G_BKPF_BSEG_UPDATE
    If they don't work, you may need to write BDC program or find the user exits available to update the field.
    Regards,
    Siva

  • How to update the field ZLSPR of table BSEG

    HI Friends,
    Can anyone tell me how to update the field ZLSPR of table BSEG? I've a 700 line abap program and I should include some logic in this program to make an entry into BSEG-ZLSPR. Is there any FM/BAPI available? Is BDC a healthy approach?. My team lead do not want me to use UPDATE statement....please help.
    Thanks in advans,
    Varsha.

    Hi,
    Hi ,
    You will need to group that radiobuttons so that SAP knows they are linked together. To do this using the grahical layout editor simply select all the radiobuttons and then right click on them, Now choose define group. Once you have done this you should not need any of the "clear" or "='X'" statements SAP should control it all for you.
    hope this helps
    Reward if found helpfull...
    Venkoji Babu.

  • I Experts, I would like to update the field BANPR with 08 with a BAPI

    Hi experts,
    I would like to Update the field EBAN-BANPR with 08 (Release Refused). Is there any BAPI through which i can update this field and also it should raise the satandard events : REJECTED / REJECTION_STOP. I did check the BAPI : BAPI_PR_CHANGE, but this will not update that field.Please let me know if you have anything. Please help me.
    Appreciate your help in this regards.
    Many Thanks,
    Prasad NN:

    I think you'll get a much better deal at the Apple online certified refurbished store. An ipad 2 64gb with cellular is there right now and costs $499.00 vs a new ipad 2 16gb with cellular which is $529.00. They also sell a 32 gb with cellular for $399.00 but only the 64gb is available now. With a refurb from anywhere else, you will not get what you will from the Apple refurb store.
    Each Apple refurbished ipad (any version) comes with a new front and back cover, a brand new battery and a full one year warranty with 90 days of phone support. Each comes in a white box like a new ipad with the wall charger and usb cable. The only difference is that it says in small print on the bottom of the box that it is Apple certified refurbished. Also, if you buy refurb, be sure to check the store many times a day. They can come and go quickly, so when you see what you want, buy it right away. Shipping is free and pretty fast. (We bought two a year and a half ago and they have been great!)
    This way you'll have cellular, all the room you need and then some and you'll save $30.00.
    Let us know what you do and enjoy your new ipad!
    Hope this helps.

  • How to update the field VEKP-EXIDV2 in HU

    Hi,
    I need to update the field EXIDV2 in VEKP table. Do you know what function module to use? And please indicate the necessary fields to be used. Thanks.
    Lalyn

    Hi Prajith,
    I looked at the FM you suggested. But I think, that FM gives me the value of the EXIDV2. I should be changing the value EXIDV2 in VEKP.THanks anyway.
    Lalyn

  • Issue in updating the long text for Routings

    Hello,
    I am developing an onject to update Long text(which are already created but need to be overwritten).
    Can this be done using /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW.
    I developed an LSMW witht this, I am able to retrieve the required field for name which are needed as key from tables.But how can I dynamically update this field for the correct value relating the operation.One issue regarding this I am facing is that in conversion, I have operation number in the source field and have maintained source field according to source file but use values just to retrieve correct value for name field in mapping,it is taking only the last operation number into account from the source file itself and not earlier values.please guide.
    Regards

    yes you can use /SAPDMC/SAP_LSMW_IMPORT_TEXTS via LSMW
    In the SAP system, there is no uniform rule for the structure of the actual text key Textname. However, in order to be able to maintain the structures and fields, you have to know what the structure of text name as well as the values for text object and text ID are.
    Procedure
           1.      Display a text of the required text type.
           2.      Branch to the editor.
           3.      Choose Goto > Header.
    The Text header dialog box appears.
    Result
    In the Text header dialog box, you gather the required information.

  • Work order should not update the fields in PR

    Hi  Gurus
    My requirements is that workorder should not updates the purchasing data fields in PR  do not go to the shoping cart. How can make it possible.
    Thanks in Advance

    Hi,
          I am not sure of your requirement clearly but check up the below user exits :-
    COZF0001 Change purchase req. for externally processed operation
    COZF0002 Change purchase req. for externally procured component
    or BADI :- IWO1_PREQ_BADI BAdI for Manipulation of P.Reqs from Orders + Networks ,SE18
    regrds
    pushpa

  • Can we update the field VBAP-BEDAE  in USEREXIT_SAVE_DOCUMENT_PREPARE

    Hi Experts,
    I have a requirement to change the requirment type(VBAP-BEDAE) of the Sales order item to be changed to custom requirment type, when ever the item quantity is changed.
    I have used the function module 'RV_SCHEDULING_TYPE_DETERMINE' to determine the scheduling type and then passed the same to xvbap-bedae to update the same for the sales order item in the user exit USEREXIT_SAVE_DOCUMENT_PREPARE.
    But as soon as the control is out of the user exit, the value is defaulted to the previous value.
    Can any body suggest me as to how to update the VBAP-BEDAE field for a sales order.
    Thanks in Advance.
    Jaya

    Hi,
    Did you modify the internal table XVBAP after populating the BEDAE? If you modify this internal table in USEREXIT_SAVE_DOCUMENT_PREPARE then the value should change.
    lw_xvbap-bedae = <your value>.
    MODIFY xvbap FROM lw_xvbap TRANSPORTING BEDAE.
    Regards,
    Immanuel.

Maybe you are looking for

  • IDoc- XI scenario (IDoc should be sent by XI client 500)

    Hi, I'd like to set up a scenario mentioned in the subject. As a source SAP system I'd like to use XI client 500. XI client 100 is used as Integration Engine. How can I generate some IDoc from the source SAP system (XI cl 500) to import it into the r

  • Old hard drive crashed, cannot get iTunes to find files

    Hi, Please help. Been working on this for weeks and can't get it right. Am at my wit's end: Old hard drive crashed; had new one installed. Tech person was able to find my iTunes on old drive and saved to thumbdrive. Downloaded most recent software an

  • Simple program with array do not want to compile

    Please do not laugh but I wrote the following program to create a array of strings. The program do not want to compile and I can not see why. Can somebody please tell me what I am doing wrong. class MyArrayOfStrings5 puplic static void main(String[]

  • Desktop Software version 5 phase out

    As last week i still can download the Blackberry Desktop Software version 5 at  'download' page of blackberry http://us.blackberry.com/apps-software/desktop/. But now i needed to go to 'service provider page' http://us.blackberry.com/support/downl

  • HT5988 Is there a version of Parallels that is compatible with OS X?

    Is there a version of Parallels that is compatible with OS X?