Update attribute on document creation
I'm trying to modify the name of a created document. In my S_TieDocument class, I use the ExtendedPreInsert method to do this but can't get it to work. Here's the code I use:
in S_TieDocument:
public void extendedPreInsert(OperationState opState, S_LibraryObjectDefinition def)
throws IfsException {
super.extendedPreInsert(opState, def);
System.out.println("********** S_TieDocument.extendedPreInsert");
//delegate the work
myOverride.extendedPreInsert(this, getSession(), opState, def);
in MyOverride:
public void extendedPreInsert(S_Document doc, S_LibrarySession session, OperationState opState, S_LibraryObjectDefinition def)
throws IfsException {
//get the document name
AttributeValue nameVal = def.getAttribute(Document.NAME_ATTRIBUTE);
String docName = nameVal.getString(session);
//modify the name
AttributeValue val = AttributeValue.newAttributeValue("Something_" + docName);
val.setName(Document.NAME_ATTRIBUTE);
def.setSystemSetAttribute(val);
//name attribute is updated but doesn't seem to be used
//try manipulating the document directly
doc.setAttribute(val);
//throws NullPointerException:
//try the update method
def.setSystemSetAttribute(val);
doc.update(opState, def);
//throws same NPE as above
I've tried 3 methods so far:
-modifying the attribute in the LibraryObjectDefinition; this does modify the attribute but the documents name stays the same; ie it looks like the changed attributes are not used.
-modify an attribute of the document
-change the LibraryObjectDefenition and update the document with it
these last 2 throw an exception in one of the Ifs classes:
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:402)
at oracle.ifs.server.OperationState.markOperationInProgress(OperationState.java:406)
at oracle.ifs.server.OperationState.addAtomicOperation(OperationState.java:299)
at oracle.ifs.server.OperationState.addAtomicOperation(OperationState.java:275)
at oracle.ifs.server.S_LibraryObject.preUpdate(S_LibraryObject.java:1496)
at oracle.ifs.server.S_LibraryObject.update(S_LibraryObject.java:1475)
at oracle.ifs.server.S_LibraryObject.setAttributes(S_LibraryObject.java:1452)
at oracle.ifs.server.S_LibraryObject.setAttribute(S_LibraryObject.java:1171)
Does anyone have an idea of how to do this?
Cheers Hans
Some more info:
The first method ( )
leads to a call on extendedPreUpdate & extendedPostUpdate,
in which the name attribute is the original name again...
from the logfile (I print the attibutes&values here):
6/16/03 12:20 PM NodeGuardian: ********** S_TieDocument.extendedPostInsert
6/16/03 12:20 PM NodeGuardian: ExtendedPostInsert called
6/16/03 12:20 PM NodeGuardian: Attributes: 14
6/16/03 12:20 PM NodeGuardian: CONTENTQUOTA = oracle.ifs.common.AttributeValuePublicObject@ebf070d
6/16/03 12:20 PM NodeGuardian: NAME = Something_hanstest.txt
6/16/03 12:20 PM NodeGuardian: LOCKOBJECT = null
6/16/03 12:20 PM NodeGuardian: ACL = oracle.ifs.common.AttributeValuePublicObject@ea2070d
6/16/03 12:20 PM NodeGuardian: RESOLVEDPUBLICOBJECT = oracle.ifs.common.AttributeValuePublicObject@eb9870d
6/16/03 12:20 PM NodeGuardian: OWNER = oracle.ifs.common.AttributeValueDirectoryObject@eac870d
6/16/03 12:20 PM NodeGuardian: CREATEDATE = 2003-06-16 12:20:52.0
6/16/03 12:20 PM NodeGuardian: CONTENTOBJECT = oracle.ifs.common.AttributeValueSystemObject@738a470a
6/16/03 12:20 PM NodeGuardian: READBYOWNER = false
6/16/03 12:20 PM NodeGuardian: LOCKSTATE = 0
6/16/03 12:20 PM NodeGuardian: DELETOR = null
6/16/03 12:20 PM NodeGuardian: LASTMODIFIER = oracle.ifs.common.AttributeValueDirectoryObject@f55c70d
6/16/03 12:20 PM NodeGuardian: CREATOR = oracle.ifs.common.AttributeValueDirectoryObject@f53070d
6/16/03 12:20 PM NodeGuardian: LASTMODIFYDATE = 2003-06-16 12:20:52.0
6/16/03 12:20 PM NodeGuardian: Document Name is : Something_hanstest.txt
6/16/03 12:20 PM NodeGuardian: ContentSize = 8
6/16/03 12:20 PM NodeGuardian: ********** S_TieDocument.extendedPreUpdate
6/16/03 12:20 PM NodeGuardian: Attributes: 3
6/16/03 12:20 PM NodeGuardian: NAME = hanstest.txt
6/16/03 12:20 PM FtpServer: 2/hans01: ANSWER: 226 Binary transfer complete.
6/16/03 12:20 PM NodeGuardian: LASTMODIFIER = oracle.ifs.common.AttributeValueDirectoryObject@539d870a
6/16/03 12:20 PM NodeGuardian: LASTMODIFYDATE = 2003-06-16 12:20:52.0
6/16/03 12:20 PM NodeGuardian: ExtendedPreUpdate called
6/16/03 12:20 PM NodeGuardian: ********** S_TieDocument.extendedProstUpdate
6/16/03 12:20 PM NodeGuardian: ExtendedPostUpdate called
6/16/03 12:20 PM NodeGuardian: Attributes: 3
6/16/03 12:20 PM NodeGuardian: NAME = hanstest.txt
6/16/03 12:20 PM NodeGuardian: LASTMODIFIER = oracle.ifs.common.AttributeValueDirectoryObject@539d870a
6/16/03 12:20 PM NodeGuardian: LASTMODIFYDATE = 2003-06-16 12:20:52.0
Similar Messages
-
API to update ASL attribute source document in 11.5.10.1
Hi All,
We are trying to update the ASL attribute source document, programmatically.
Can you please tell us, which API will be used to do so or any other alternatives?
Thanks & Regards,
GowriHi Helios,
Thank you for the update, actually the problem is solved.
The issue is : Whenever i am trying to show a message in that form using either form personalization or CUSTOM.pll, it is giving the error, if i do any thing else like 'changing the default where clause etc', it is not giving any error. The problem is only with message. Actually my requirement is changing the where clause, which is happening with out any problem. I dropped the idea of showing the message any way.
This problem is strange. Any ways, i am raising an SR with Oracle.
Raj -
User Exits / BADIs triggered during the Material document creation
Hi Experts,
Can anybody tell me the User Exits / BADIs /Possibilities that can be triggered during the Material Document Creation which can be used to update the Equipment Master User Statuses.
Thanks,
Sangeeta.Hey Sangeeta,
Try these User Exit's
MGA00001 Material Master (Industry): Checks and Enhancements
MGA00002 Material Master (Industry): Number Assignment
MGA00003 Material Master (Industry and Retail): Number Display
Using Enhancement MGA00001 (Function Exit : EXIT_SAPLMGMU_001 ) you can validate & Change your Material Document Number.
Badi's
BADI_EAN_SYSTEMATIC
BADI_GTIN_VARIANT
BADI_MAT_F_SPEC_SEL
BADI_MATERIAL_CHECK
BADI_MATERIAL_OD
BADI_MATERIAL_OD
BADI_MATERIAL_REF
BADI_MATNR_CHECK_PVS
BADI_MM_MATNR
BADI_MM_MATNR
CDT_CHECK_MATERIAL
MG_MASS_NEWSEG
MG_MASS_NEWSEG
WRF_DISCONT_FACT_E
Note: This is for transaction code MM01, MM02 & MM03.
Regards,
Saravanan M -
SeCess not updated in Posted Document
Dear All,
System is not updating SeCess amount for Export Invoices and Free of Cost Sales.
When we are creating Excise Invoice for FOC sale and Export Invoice system display BED, ECS and SeCess amount at J1IIN but after posting system do not show amount SeCess field,
This is working fine in case of Commercial Invoice Creation and Excise Invoice. Not able to understand the reason for the same.
Regards,
VivekHi Vivek,
The SEcess is displaying but not updated in posted document.
Please check follwing configuration
1-SPRO>IMGO>LOGISTICS GENERAL>TAX ON GOODS MOVEMENT>INDIA>BASIC SETTING>DETERMINATION OF EXCISE DUTY>MAINTAIN EXCISE DEFAULTS
Ensure your SEcess condition is maintaines in A/R AT1
2-SPRO>IMGO>LOGISTICS GENERAL>TAX ON GOODS MOVEMENT>INDIA>BASIC SETTING>DETERMINATION OF EXCISE DUTY>Classify Condition type.
Ensure your SD pricing procedure(Pricing Procedure-Export,Raw material Sales,FOC) assignment should be maintained with SEcess condition type.
Regards
Rajev -
Authorization for Measuring document creation
Hi,
i have one issue. I want to provide authorization for measuring documents creation. That has been done by providing the different authorization groups in roles for T codes IK11, Ik12 etc to the users. Now users with a authorized authorization group for perticular measuring point can create a measuring document fo that. But the problem is that despite the authorization group, if user goes to t code iw41 for order confirmation , there he can create measuring documents of any authoprization group. How to control that thing. I also give authorization group authorization for t code IW41 but still it is allowing for the creation of documents. any help on this thing.
Regards,
Aman SharmaHi
there are two ways you can control the measurement reading entry
1. Block the authorisation of IK11.When you go to confirmation screen through IW41 , there a button for measurement document update. Even the user will press it system will not allowed to enter in it as he is no authorisation
2.You can configure the screen template for overall confirmation and use this profile while doing overall confirmation using iw42. There you can hide the measurment detail screen.
customising node " Set Screen Templates for Completion Confirmation "
Regards
Amar -
Item text (BSEG-SGTXT) is not getting updated in Payment document generated
Hi All,
Item text (BSEG-SGTXT) is not getting updated in Payment document generated through F110.
After generating the payment document via Transaction Code u2013 F110, system is not updating the
Text field (BSEG-SGTXT) in the payment document with the text that we have entered in the Invoice (MIRO or FI Invoice).
In case of manual payment (F-53) we can input the text manually hence that will get updated in
payment document but this thing is not possible with F110.
How can I update it?
Is there any configuration for that?
Thanks
Daniel DortaHi All,
I've applied the two notes as recommended. However, when I run FBL3N for payment run items, the Text field is update with wrong data, i.e. not from the Text field in FB60
Thus, I'll like someone to help me with what should exactly be done on the 'Step', 'Pre-requisite' and 'Substitution' side of the Substitution rule (TCode GGB1), I did not fill anything in the Pre-requisite box - is this right?
Thanx in advance. -
Item text is not getting updated in Payment document generated through F110
Hi all,
After generating the payment document via Transaction Code u2013 F110, system is not updating the Text field in the payment document with the text that we have entered in the Invoice (MIRO or FI Invoice).
While processing the document via transaction code u2013 F110, in the layout shown for the Invoices to be considered for payment (screen of u201CEdit Proposalu201D), text is not getting updated. When we pressed F1 at the Text field (Which is blank) we came to know that it is a u201CItem Textu201D with u201CTable u2013 REGUEu201D / u201CField u2013 SGTXTu201D.
In BSEG (SGTXT field) as well as BSIK (SGTXT field) we are getting the Invoice document with the text maintained in it via MIRO or FI invoice.
But while processing the invoices through Tcode - F110, in the layout of Edit Proposal (Table - REGUE / Field - SGTXT) we are not getting the u201CText fieldu201D but getting the other data such as Doc. No.( Table - REGUE / Field - BELNR), Fiscal Year (Table - REGUE / Field - GJAHR) etc for processing the proposal which is getting shown in BSEG as well as BSIK.
In case of manual payment (F-53) we can input the text manually hence that will get updated in payment document but this thing is not possible with F110.
Can anybody guide me on getting the ItemText (Not Doc. Header text) in FI payment document after F110 execution?
Regards,
ShridharHi Suresh,
Thanks for the prompt reply. We will be obliged if you guide us in that respect since F110 is a Std. SAP code.
Have you refer OSS before arriving at the conclusion of developing ABAP program since the Item Text is a std. field of Std. Tcode - F110. Same should had been get updated while making the payment in reference to the Invoice which haves item text in it ?
Regards
Shridhar
FICO -
Excise Invoice List-Pending for ARE document creation
Dear All,
Is there any standard Tcode for getting the list of excise invoice which are pending for ARE documents creation or with the status of ARE documents.
Thanks & Regards,
AntimaHi,
No there is no standard report available for this requirement. You may need to develop a Z report.
J1ARE_AGE gives u the status after creation of ARE1.
Thanks
Krishna. -
Encountered error while updating the payment document
Hi Guys,
I encountered an error while updating the payment document of one of our bank account. See below error message:
Error: Unable to lock the record. Cause: The record is being modified by another user
thanks,
gracieHi Vikas,
Repeat the changes you are trying to make one step at a time and make sure you click on update in both the series screen and the document numbers screen every time.
I've faced this issue and doing this helped.
Regards,
Hamsa -
How to restrict update to a document in state release to the contribution g
How to restrict update to a document in state release to the contribution group.
Hi I’m working with UCM 10g and I want to know if it is possible to restrict the update over a document that is on state release for the group of users that made the check in of the document ?
thanksYes, it is, but IMHO in a rather complicated way:
- you could change the security settings (security group, or more likely, accounts) during the life cycle, or
- you could implement collaboration management, and change security settings via ACLs
Alternatively, depending on what you mean by "updating" documents you could also:
- check-out the document by a system account (if you want to prevent your users to check-in a new version)
- modify the GUI so that Update (metadata) action is not available to users (in theory, they could still access it via a direct service call) by a custom component
- introduce a Java event filter (enhancing the UPDATE service) where you will implement whatever logic you want
I would probably opt for the last options as it seems to me to be the cleanest solution (but yes, it requires some coding). -
Profit center document created but profit center not updated in FI document
Hi Experts,
I have a strange issue; we created FI document via billing document (SD) where in profit center document got created but profit center is not updated in FI document.
We have separate table to identify the profit center by customer.
Please let know what could be the cause or reason for this kind of scenario
Thanks,
VKHi Krishna,
Though ur question seems very old, but now i got the same requirement as like you.
So if you remeber what needs to be done for this issue thats very good help to me.
My Requirement is : I have created Service Entry Sheet by referring PO and while releasing this Service Entry Sheet system is generating MIGO Doc and FI documents in background.
And I have updated PERNR (Persnoal No.) in MSEG-SGTXT by using enhancment but it's not populating in BSEG-SGTXT.
And I found an internal table while debugging i.e ; like ACCIT (not exactly ,similar to this ) where i have updated pernr and sgtxt but same thing will not available in FI Doc display (BSEG-PERNR or BSEG-SGTXG)
So could you plz suggest what needs to be done to achieve this. Im assuming that, is it possible through BTE (Business Transaction Events) ?. if yes, plz tell me how to proceed.
Thanks
Madhan -
hi guys,
i have one requirement. I want to upload thousands of technical manuals in to SAP . So what i did is i made one BDC for document creation and uploaded in the system. Now the problem is the doucments created have status create. By BDC i am not able to change the status to in work and released. Without releaseing the document i am not able to use it in equipment master data.
Can anyone kow how to do the mass change of documents where i can change the status to release from create. Or any other program for thisHi,
Its simple ask the concerned developer to make a modification in the upload program to open in change and set the document status one by one means opened in change make the status Work Request and save than again open in change set the status In Work then again and so on .... unless the status will become released.
or
In customization set the status directly to released at first step.
Regards,
EJ -
SRM 7.0 PCW. Follow-on document creation
Dear experts: we are in SRM 7.0 and have implemented PCW with approval at item level. Our end users want to have automatic follow-on document creation inmediatlly after SC item approval. However, as per standard SAP SRM, they have to wait untill all levels for all items have been approved.
One example will illustrate: A shopping cart with two items. Due to the threshold, item1 requires only one level of approval, while item2 requires two levels. Both items will result in a dfferent purchaisng document in the backend system in a classic scenario: Item1 will result in a PReq, while item2 will result in a Purchase Order.
Once first level for the two items have been approved, would it be possible to generate the follow-on document for the first item as no further approval for this item is needed is needed?
Our end users are familiar with Preqs in MM, where item approval process is done at item level and the follow-on document can be created even when the other items in the PReq are not yet approved.
Thanks in advance for your valuable help.
Regards
ValentíHi,
No, this is not possible, once all the item in a SC approved, then only system will create a follow-on-documents. As per your scenario , item1 will still wait until item2 gets approved. This is standard.
Saravanan -
ECC document creation timing for mismatch values in ECC and Bw report.
hi gurus,
i am extracting data from ECC at 10.pm (ist) and my process chain should start to load data at 2.30 am (ist) then in morning i am refreshing BW report try to reconcilied from my extracted ECC but i am finding so many mismatsh values. so i want to know that record (document creation time )from BW refresh is after or before Process chain start or after ECC extraction,if this case record posted after ECC so that its showing me mismatch in BW and it will populate in ECC on next day.please tell me step to freeze on which record come to me on next.
i hope u undarstand my prob.
Many thanks
Ganeshgot it.
-
Updating a XML document with a processing instruction
Greetings Guru's
I have a fully functional XML database solution for our new system. The only thing left is for me to update a xml document in the database with a processing instruction to find the style sheet (JAXB strips it out when the XML must go back into the database).
I can update complete nodes and node elements in the xml document using updateXML in a regular update statement, but I do not know how to add the following processing instruction to my documents.
<?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
[pre]
Thanks in advance
DerrickSQL> var xmltext varchar2(4000)
SQL> --
SQL> begin
2 :xmlText := '<Hello>World</Hello>';
3 end;
4 /
PL/SQL procedure successfully completed.
SQL> drop table t
2 /
drop table t
ERROR at line 1:
ORA-00942: table or view does not exist
SQL> create table t of xmltype
2 /
Table created.
SQL> set long 10000
SQL> --
SQL> insert into t values (xmltype(:xmltext))
2 /
1 row created.
SQL> select *
2 from t
3 /
SYS_NC_ROWINFO$
<Hello>World</Hello>
SQL> update t set object_value = updateXML
2 (
3 object_value,
4 '/',
5 xmlconcat
6 (
7 xmlpi("xml-stylesheet",'type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"'),
8 object_value
9 )
10 )
11 /
1 row updated.
SQL> select * from t
2 /
SYS_NC_ROWINFO$
<?xml-stylesheet type="text/xsl" href="/RASWEB/JIT_REPORT.xslt"?>
<Hello>World</Hello>
SQL>
Maybe you are looking for
-
When I bought my iPhone 4S, I let my husband have my old 3GS to listen to my itunes music on (it's connected on iCloud). Trouble is, we're separated now, and I want to turn off the iCloud on that 3GS because I don't want him to be able to turn on any
-
Illustrator CS5 Startup Crash Win7 32bit
Illustrator CS5 crashes every time I Iaunch the applicaton after about 3 seconds of being open. The program worked at first before I installed my pen driver, I can not update my graphics tablet / pen as there are no driver updates available. I have t
-
Error Messages After Installing Leopard 2
After installing Leopard from the Install DVD, I used Software Update to update to 10.5.1, and updated QuickTime, etc. I also ran Cocktail, the Leopard edition. The Hard Drive checked out OK. When I ran Repair Permissions in Disk Utility, I got a num
-
how can i activate my phone to work with a carrier here?
-
Can i use the ipad 2 3g bought in the philippines in usa?
Planning to buy ipad2 3g in the philippines, will the 3g work here in usa?