Updation of Refernce field in FBCJ transaction fails?

Hi,
I need to update refernece field of FBCJ transaction code with document number.
Checked CJ_DOCUMENT badi, can not be used. During save, one of the function module is called,
FCJ_SAVE_ALL FM, I am writing code within this, afer FCJ_SAVE because it doesnt updates posting number before.
LOOP AT I_L_ITCJ  INTO WA_ISCJ_POSTINGS.
Copying The value of posting number to document Number
      WA_ISCJ_POSTINGS-DOCUMENT_NUMBER = WA_ISCJ_POSTINGS-D_POSTING_NUMB.
Modifying the Internal table from work area.
      MODIFY I_L_ITCJ  FROM WA_ISCJ_POSTINGS TRANSPORTING DOCUMENT_NUMBER
                   WHERE D_POSTING_NUMB = WA_ISCJ_POSTINGS-D_POSTING_NUMB.
Clearing the Workarea.
      CLEAR WA_ISCJ_POSTINGS.
    ENDLOOP.
    ITCJ_POSTINGS[] = I_L_ITCJ[].
    L_MANDT = SY-MANDT.
    DATA : LS_DOCUMENT TYPE TCJ_DOCUMENTS.
   LOOP AT ITCJ_POSTINGS INTO WA_POSTINGS.
    LS_DOCUMENT-MANDT           = L_MANDT.
    LS_DOCUMENT-POSTING_NUMBER   = WA_POSTINGS-POSTING_NUMBER.
    LS_DOCUMENT-CAJO_NUMBER      = WA_POSTINGS-CAJO_NUMBER.
    LS_DOCUMENT-COMP_CODE        = WA_POSTINGS-COMP_CODE.
    LS_DOCUMENT-FISC_YEAR        = WA_POSTINGS-FISC_YEAR.
    LS_DOCUMENT-CURRENCY         = I_CURRENCY.
    LS_DOCUMENT-H_RECEIPTS       = WA_POSTINGS-H_RECEIPTS.
    LS_DOCUMENT-H_PAYMENTS       = WA_POSTINGS-H_PAYMENTS.
    LS_DOCUMENT-H_NET_AMOUNT     = WA_POSTINGS-H_NET_AMOUNT.
    LS_DOCUMENT-H_NET_PAYMENT_WT = WA_POSTINGS-H_NET_PAYMENT_WT.
    LS_DOCUMENT-H_TAX_AMOUNT     = WA_POSTINGS-H_TAX_AMOUNT.
    LS_DOCUMENT-BP_NAME          = WA_POSTINGS-BP_NAME.
    LS_DOCUMENT-DOCUMENT_DATE    = WA_POSTINGS-DOCUMENT_DATE.
    LS_DOCUMENT-DOCUMENT_NUMBER  = WA_POSTINGS-D_POSTING_NUMB.
    LS_DOCUMENT-POSTING_DATE     = WA_POSTINGS-POSTING_DATE.
    LS_DOCUMENT-VALUTA_DATE    =   WA_POSTINGS-VALUTA_DATE.
    LS_DOCUMENT-ACCOUNTANT       = SY-UNAME.
    LS_DOCUMENT-TAX_PERCENT      = WA_POSTINGS-TAX_PERCENT.
    LS_DOCUMENT-D_POSTING_NUMB   = WA_POSTINGS-D_POSTING_NUMB.
    LS_DOCUMENT-TEXT1            = WA_POSTINGS-TEXT1.
    LS_DOCUMENT-TEXT2            = WA_POSTINGS-TEXT2.
    LS_DOCUMENT-BUPLA            = WA_POSTINGS-BUPLA.
    LS_DOCUMENT-SECCO            = WA_POSTINGS-SECCO.
    LS_DOCUMENT-EXCH_RATE        = WA_POSTINGS-EXCH_RATE.
    LS_DOCUMENT-MEANS_OF_PAYMENT = WA_POSTINGS-MEANS_OF_PAYMENT.
    LS_DOCUMENT-CHECK_NUMBER     = WA_POSTINGS-CHECK_NUMBER.
    LS_DOCUMENT-CHECK_ISSUER     = WA_POSTINGS-CHECK_ISSUER.
    LS_DOCUMENT-BANK_KEY         = WA_POSTINGS-BANK_KEY.
    LS_DOCUMENT-BANK_ACCT        = WA_POSTINGS-BANK_ACCT.
    LS_DOCUMENT-BANK_CTRY        = WA_POSTINGS-BANK_CTRY.
    LS_DOCUMENT-CHECK_STATUS     = WA_POSTINGS-CHECK_STATUS.
    LS_DOCUMENT-CHECK_STACK      = WA_POSTINGS-CHECK_STACK.
    LS_DOCUMENT-REVBELNR         = WA_POSTINGS-REVBELNR.
    LS_DOCUMENT-LZBKZ            = WA_POSTINGS-LZBKZ.
    LS_DOCUMENT-LANDL            = WA_POSTINGS-LANDL.
    LS_DOCUMENT-SPLIT            = WA_POSTINGS-SPLIT.
    LS_DOCUMENT-VATDATE          = WA_POSTINGS-VATDATE.
    CALL FUNCTION 'FCJ_INSERT_DOCUMENT'
      EXPORTING
        I_DOCUMENT    = LS_DOCUMENT
      EXCEPTIONS
        INSERT_FAILED = 01.   "
This code I am using as insertion was done before this function module so my insertion fails here, any other workaround to populate reference field. I can see it populated, once i leave transaction and come back again I dont see reference field.
Regards
Mohinder

Hi,
Its resolved.
updating posting
using function module CALL FUNCTION 'FCJ_CHANGE_SAVED_DOCUMENT'
Thanks
Mohinder Singh Chauhan

Similar Messages

  • USEREXIT to update BSEG-BVTYP field through VF01 transaction

    Hi Folks !
    I have a requirement where I have to update the Partner Bank Type(BSEG-BVTYP) field through the transction VF01.
    I tried with many exits like SDVFX008, RV60AFZC, RV60AFZZ and Includes like ZXVVFU01, ZXVVFU08, but unfortunately no results.
    I want to know which structure is passed from SD to FI when we create a invoice in VF01.
    Please help me, how could i update this field through VF01.
    Thanks in advance !

    Hi Sudarsan
    What u r telling u tried the exit
    SDVFX008 and u didnot get the solution.
    This exit is for the structure sd-fi only and i have created 2 projects with this for somw enhancement and its  populating with vf01.
    Pls try to craete a project on this exit and write code in the functionm exit of that definitely u will get the solution.
    Rajendra

  • Update existing date field

    select date1, arrtime, deptime,
    CASE WHEN arrdep = 'A' then
    to_date(to_char(date1, 'dd/mm/yyyy')||to_char(to_date(arrtime, 'hh24:mi'), 'hh24:mi'), 'dd/mm/yyyy hh24:mi')
    ELSE to_date(to_char(date1, 'dd/mm/yyyy')||to_char(to_date(deptime, 'hh24:mi'), 'hh24:mi'), 'dd/mm/yyyy hh24:mi')
    END as DepArr from table1
    output
    ====
    date1 arrtime deptime DepArr
    2005/10/25 0 0830 2005/10/25 08:30:00
    2005/10/27 2215 0 2005/10/27 22:15:00
    when i use the above select statement, the output displays fine, but when i tried to update the date1 field with DepArr, it fails with ORA-01861
    update table1 set date1 =
    CASE WHEN arrdep = 'A' then
    to_date(to_char(dt, 'dd/mm/yyyy')||to_char(to_date(arrtime, 'hh24:mi'), 'hh24:mi'), 'dd/mm/yyyy hh24:mi')
    ELSE to_date(to_char(dt, 'dd/mm/yyyy')||to_char(to_date(deptime, 'hh24:mi'), 'hh24:mi'), 'dd/mm/yyyy hh24:mi')
    END
    the date1 field's datatype is date
    thanks.

    As far as I can see, your select can be simplified to:
    select date1, arrtime, deptime,
    to_date(to_char(date1, 'ddmmyyyy')||decode(arrdep, 'A', arrtime, deptime), 'ddmmyyyyhh24mi') as DepArr
    from table1Make sure that date1 and arrtime/deptime is not null otherwise to_date will fail
    Message was edited by:
    Jens Petersen

  • How to update Z-Fields in BP Transaction

    Hi SDN members.
    I´m using the BDT event DSAVE and checking some own table values. Now I want to update some customer fields of the Business Partner. How is this possible? I don´´t want to update the database directly. These fields have to download also to the mobile sales system.
    Does anyone know the procedure?
    Thx andreas

    Hi,
    You should update them in the memory. They will then be included in the transactional save & the outbound bdoc. Depending on where the Z-field is located, you can use the BUPA-functions to read & modify the memory. Take a look at functions CRM_BUPA_FRG*
    The easiest way is to enhance the business partner  transaction with the easy enhancement workbench and fill the field in the Badi.
    Michael.

  • Reg:updation of likp-btgew field in vl02n transaction

    hi friends,
    in my requirement i have to populate the field likp-btgew in vl02n when the outbound delivery was created
    i have updated the field by  using user exits in program sapmv50a,
    now the field is getting updated but   my problem is  when i change the line items weight dynamically the total
    weight is not getting updated according to my change
    i have read the sap oss note-415716(for delivery processing) the user exit (USEREXIT_SAVE_DOCUMENT_PREPARE)
    is triggered only when i pressed save.
    but my requirement is when user change any of the line item quantity and press enter the total weigt field has to get
    updated bcz for multiple line items every time saving is not possible right? its bit lenghthier.........
    can anybody pls suggest is there any other way or any usrexit or badi available for this req to update the screen
    field likp-btgew dynamically.....
    pls help......
    regards
    babu

    hi khan,
        thank u for ur reply,
             the userexits i have choosen r working properly except in one case,when i remove or add  any of  the line items in my delivery total weigt is not getting updated,except in this case, it is working fine when i created the new order r if change the line items quantity it is working fine moreover i will check the userexits specified by u .
    if there is any other way pls let me know guys...
    regards
    babu
    Edited by: babu888 on Feb 10, 2012 3:59 AM

  • How to add a new field in migo transaction (header level)

    hi guru's
    can you please tell me how to add a field in migo transaction?
    i want to add a field in header data and that too under "general" tab. i dont have data regarding that field.
    and when we enter a value for that field in migo, it has to take .
    thank you.

    Hi, My problem is allmost like the one you are discussing here....
    I have appended MKPF for my Z-fields and created a sub-screen (Design the screen). I am calling this screen in PBO_HEADER. Now i can see my newly created tab along with fields.
    Now the problem is:-
    1. How I can transfer that data entered in screen fields back to my BADI.
    2. How to update my z-fields in MKPF table along with standard fields. I have tried using FM - 'J_1IEXGM_BADI_POST_DOCUMENT' in Method - POST_DOCUMENT, but its not updating table record in MKPF for Z-Fields.
    Please advice.....
    Thanks

  • Updating values in database table through Transaction

    Hi,
    Actually We have one transaction named EWAWA01. In that when we display the values from the transaction, there is a netweight field. The transaction displaying netweight values, but that value is not updated in the database table named EWA_WA_WEIGHPROC. How can i update that netweight value in the table.

    data:v_v_EWA_WA_WEIGHPROC type  (v_EWA_WA_WEIGHPROC lenth) c.
    decleare the data in charter type.
    after pass the data charter type.
    v_EWA_WA_WEIGHPROC = EWA_WA_WEIGHPROC
    update db.

  • Deferred transaction fails due to a "ORA-01403: no data found" error

    I recently acticated replication between two Oracle instances.
    (one being the master definition site and the other one being
    a second master site).
    Everything was going well until two weeks ago, when i realized
    that some datas were different between the two Oracle instances.
    I tried to figure out why and found that some deferred transation
    failed to propagate due to a "ORA-01403: no data found" error.
    Not all transaction fail, only a few.
    All the errors are stored in the DEFERROR table of the second
    master site, the DEFERROR table is empty in the master definition
    site.
    For every error, the source is the master definition site and the
    destination is the second master site, which is OK because the
    second master site is supposed to be "read-only". But why are the
    errors stored in the DEFERROR table of the second master site
    (and not in the master definition site (the source)).
    Most errors occur on UPDATE statements but a few of them occur
    on DELETE statements. Given the fact that the record actually is
    in the second master site, how is it possible to get a
    "ORA-01403: no data found" error on a delete statement ???????
    I can't figure out what data cannot be found,
    Thanks for your help,
    Didier.

    What if i tell you the first transaction in error is an UPDATE
    statement on a record that actually is in the destination table
    in the second master site. So the data is there, it should be
    found ...
    I've tried an EXECUTE_ERROR on that very first transaction
    in error but it doesn't work. Here's the call (as repadmin) :
    begin
    DBMS_DEFER_SYS.EXECUTE_ERROR (
    DEFERRED_TRAN_ID => '6.42.271',
    DESTINATION => 'AMELIPI.SENAT.FR'
    end ;
    And here's the full message :
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_DEFER_SYS_PART1" line 430
    ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1632
    ORA-06512: at "SYS.DBMS_DEFER_SYS" line 1678
    ORA-06512: at line 2
    I thought it could be because the primary key constraint on the
    destination table wasn't activated but it was. Could it
    be a problem with the corresponding index ?
    Thanks for your help,
    Didier.

  • Modifying/Updating User Defined Field in a Scheduled Task

    I've written a notification task to send an e-mail to a manager who has a contract employee with a contract that is about to expire.
    Once we isolate a user who has a contract about to expire, we send a notification to the manager. The date that the notification is sent out should be stored in the USR table in a user-defined field, "USR_UDF_LASTSENT."
    Updating this USR_UDF_LASTSENT field is where I'm having difficulty.
    I've tried using the UserManager in a couple of ways. Suppose I've isolated a single user using SearchCriteria and the UserManager and have a single User object called "currentUser." I want to store a Date object in the user defined field "USR_UDF_LASTSENT". Date today = new Date();
    I've tried: currentUser.setAttribute("USR_UDF_LASTSENT", today); //This will run without error, but when I check the DB there is no change to the attribute.
    With a defined instance of UserManager userManager, I've tried: userManager.modify("USR_UDF_LASTSENT", today, currentUser); //This errored out with this error - oracle.iam.identity.exception.NoSuchUserException: IAM-3054135:No user found for the criteria USR_UDF_LASTSENT-9/24/13 2:58 PM.:USR_UDF_LASTSENT:9/24/13 2:58 PM. It looks like it's doing a search rather than a modification.
    I've also tried using the entity manager in the following way:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But it returns with this error: Failed: oracle.iam.platform.entitymgr.UnknownAttributeException: User : [USR_UDF_LASTSENT]
    Is my entityType, "User" inappropriate in this case? What should be used here?
    How can I Set or Update this user defined field from a scheduled task?

    Thanks guys. I did go to Identity System Administration console and chose 'Export' from under "System Managment" which I believe Kevin may have been hinting at. I got an xml export of the AttributeDefinitions for our user defined fields. In this file, there was a header for the attribute I was looking for:
    <AttributeDefinition repo-type="API" name="LastSent" subtype="User Metadata">
       <multiValued>
       <backendName>usr_udf_lastsent</backendName>
    I put the string "LastSent" in place of USR_UDF_LASTSENT in the EntityManager version of my attempt at this task. I believe this is what Kevin and delhi were getting at.
    This didn't work:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("USR_UDF_LASTSENT", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    But this did:
    Date today = new Date();
    HashMap<String, Object> mapAttrs = new HashMap<String, Object>(); 
    mapAttrs.put("LastSent", today); 
    EntityManager entMgr = Platform.getService(EntityManager.class); 
    entMgr.modifyEntity("User", currentUser.getEntityId(), mapAttrs);
    I wonder if currentUser.setAttribute("LastSent", today); would work... Hmm.

  • Unable to update Logical Delete field in AS400

    hi all,
    We have an ESB process that polls for data in AS400 DB and transfers this data into an Oracle DB. This polling is based on Logical Delete. The data transferred is in the range of some lakhs of records. So we are sending around 5000 records per transaction in ESB. When we deploy the process, the data in AS400 is being read and getting transferred. However, the status field is not changing to 'Read Value'. Due to this, we are facing a lot of issues like, when we're in middle of data transfer and the opmn restarts, the data which has already been transferred is also being read and this is throwing an error because of primary constraint violation. Even after the data transfer, if we delete any rows in Oracle DB, the data transfer resumes as the status field is not updated.
    I have worked with logical delete in Oracle DB before and was working fine.
    Please help me with Logical Delete functionality in case of AS400 Database and also please let me know the privilages we need to have on the AS400 DB to successfully run this process.
    Thanks,
    Kamal.

    Hi,
    According to your post, my understanding is that you was unable to update managed metadata field in designer workflow.
    You need to provide the exact string for the MMS value, in the form of <id>;<value>.
    The format of the value you wanted to set is uncorrectly, so you cannot update the managed metadata field.
    If you want to set the managed metadata field value with correct format, you’d better to create custom action.
    There is an article for your reference, although it is about the SharePoint 2010, it is similar to SharePoint 2013.
    http://patrickboom.wordpress.com/2013/07/23/workflow-activity-set-managed-metadata-column/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Problem with ojdbc14.jar (oracle10g Rel. 2 driver) in updating a BLOB field

    Hello All,
    Our web application uses oracle10g Release 2 jdbc driver with websphere 5.1.1.4 and oracle 9i. When it tries to update a BLOB field in the database updation is successful but it is updating that field with a null value. So rest of our application fails as this value is becoming null. We use an entity bean to update this table and websphere uses a prepared statement to update this table. Just before setting this BLOB field using setBinaryStream() on prepared statement I am printing to see whether it is null or not as shown in the code snippet below. And it is printing it correctly as non null. But after execution of the prepared statement some how the value stored in database is null.
    Is this a known issue with this driver? Does any one know work around or a solution to this? We have 3 BLOB fields in that table. Is that a problem? If we separate these BLOB fields into separate tables will the problem be solved? Any input on this is very much appreciated.
    // For column ORIGINAL_CONTENT
    byte[] tempbyteArray;
    tempbyteArray=(byte[])inputRecord.get(25);
    if (tempbyteArray == null) {
    System.out.println("DqPageBeanFunctionSet_f9c724af: tempbyteArray NULLLLLLL");
    } else {
    System.out.println("DqPageBeanFunctionSet_f9c724af: orig tempbyteArray length: " + tempbyteArray.length);
    if(tempbyteArray != null) {
    pstmt.setBinaryStream(25,new java.io.ByteArrayInputStream(tempbyteArray),tempbyteArray.length);
    else pstmt.setNull(25,java.sql.Types.BLOB);
    Thanks & Regards,
    -Sunitha

    I have similar problem and I solved it using ojdbc14.jar oracle9i version.
    try...

  • GenIL Model Attribute Structure not getting updated with new fields added

    Hi All,
    I have modelled the service interface using GenIL Modelling in Duet Enterprise 1.0. Later, I added some fields to the read operation in the Enterprise Services Builder in the ESR system.
    But in the Read Operation mapper method "/IWFND/IF_SRD_BOP_MAP_GET_OBJ~MAP_POST_GET_OBJECTS",  when I try to define an object of type GenIL model Attribute Structure (ZMDLZPRGET_DETAIL),  Iam unable to access the newly added fields in the read operation.
    In transaction " GENIL_MODEL_EDITOR ", under Root Objects, when I open the Attribute Structure name, only the old fields are available, newly added fields are not updated.
    But I was able to see the newly added fields in the READ OPERATION data types of Enterprise Services Browser in SE80.
    Please help me how to update the new fields for GenIL Model Attribute Structure(ZMDLZPRGET_DETAIL).
    Thanks,
    Kris

    Hi sap_wiz,
    Thanks for your reply.
    My problem solved,
    Thanks
    Kris

  • How to update XREF1, XREF2 fields

    Guyz,
    i've captured few custom values for specific G/L Documents during creation through BTE.... if i want to give user to change the values selected during creation, i'm looking for options to change xref1, xref2 fields in BSEG....
    no bapis found..... FI_DOCUMENT_CHANGE doesn't work for XREF1, XREF2 if my doc is G/L Account (BSEG-KOART = 'S') ....
    following are my thoughts, and want your suggestions on this or any advise pls...
    1>> BDC
    2>> direct update BSEG (i'm afraid of transaction integrity aswell, so require all tables to update , if required....
    OR
    any other miracle?
    thanks in advance

    HI,
    Can you please share your solution.
    Thanks,
    Themba

  • Additional fields in MIGO transaction

    Hi Everybody,
      We have a requirement where we need to have additional fields in MIGO transaction when the user chooses 'distribute qty' option to split the quantity, the normal screen shows the following fields,
    1. Qty in UnE
    2. Stock type
    3. Movement type
    4.Stor location, we need Serial number, Drum number in Screen number 1000 of SAPLMIGO program,  Can any one tell me how do I achieve this functionality,
    Rgds,

    The only option I see is design your own custom screen with the required fields and call it as popup ( Modal Dialog Box ) from user exit ZXMBCU02 .
    This user exit will be triggered when you click on "CHECK" or "SAVE" button.
    There is no way to modify MIGO screen itself , so maybe you will have to pass the item number etc from MIGO and have a table control on your custom screen for data entry.
    For saving data into database donot use this exit as a user may just check and go out and you will unnecssarily push the data into z table . In this exit do an export to memory for your custom fields.
    In another exit ZXMBCU01 , do an import from memory and update the required Z table . This exit is called while updating material document in update task.
    However to goto popup screen for displaying chnaging custom fields you will have to press "CHECK" button , maybe a user training issue.
    Cheers

  • Mass updation of Priority field in the process order header screen

    Hi Friends,
    Can any body knows on how to do mass update the Priority field in the process orders after release.(with out upload using BDC).
    or can we update the priority field in process order during mass release of process orders using  T- code: COHVPI?
    Is there any standard transaction? else please tell me the solution if there is any other way of doing this task.
    thanks&regards,
    Purna

    Purnachander,
    Your requirement can not be fullfilled with any standard transaction.
    BDC is best suitable option.
    Hope this helps you.
    SmanS

Maybe you are looking for

  • SOAP and SRT services

    Hi all, I have understood that the services under the node <b>/default_host/sap/bc/soap</b> apply to RFC function modules (thus, including BAPI) and that the list of available RFC FMs were visible at the URL : http://<server>:<port>/sap/bc/bsp/sap/we

  • How to use Native SQL String

    Hi all, How do i use Native SQL String in the Reciver JDBC Adapter. Do i need to change the message format could u suggest me some blogs on the same. Also please can anyone let me knw if i can use this for stored procedure.

  • Financial Reports error message Java API can't connect to olap

    Hi, On version 11.1.1.3, after reapplication of 11.1.1.3 because of other problems with shared services, get the following message on the diagnostics for the financial reporting server. Launch external checker with next command: E:\Hyperion\common\va

  • Is W500 GPU dead?

    Hi all,    For a while I've been searching the internet for my GPU problem and need some help. About a month ago, I've purchased a used W500 which has a T9900 CPU (3.06Ghz, 6MB cache) and 4GB of ram. As mentioned on the web, w500s have Ati FireGL v57

  • OBJECTDATAPROVIDER  WD ABAP Component

    Did anyone use OBJECTDATAPROVIDER WD ABAP component in their WD component and tried calling  "INIT_DATA_FROM_DATAVIEW" method of the interface controller to create data from Dataview directly. I am facing problem with this method because there is no