Unable to capture field values in Master agreement Line Items
I am trying to get the field values from master agreement line items page. I have written the following code to get the line item details which is working fine to capture part number and quantity->
agreementBean = doc.getRootParentIBean();
lineItemCollection = agreementBean.getLineItems();
collectionsize = lineItemCollection.size();
for(i=0;i<collectionsize;i++){
collectionbean = lineItemCollection.get(i);
partNum = ""+collectionbean.getPartNumber() ;
Quantity = ""+collectionbean.getQuantity();
throw doc.createApplicationException(null,partNum + " , " + Quantity );
Now, my problem is that I am unable to capture the following field item values in the master agreement > line items page.
1. Price Unit
2. Unit Price
3. Product Category
4. Plant
Please help me to find the values.
Thankx in Advance.
Su
Edited by: subrataindra on Aug 10, 2010 11:11 AM
This will return the name of the plant.
.getExtensionField("PLANT").get().getDisplayName(session);
Check if this returns the product category
collectionbean.getExtensionField("ITEM_CAT").get().getDisplayName();
This will Return the Price
collectionbean.getExtensionField("PRICE").get().getPrice();
(return type :BigDecimal)
This will return the currency
collectionbean.getExtensionField("PRICE").get().getCurrency;
(Return type:String)
Similarly to retrieve other fields for which there are no standard functions, use .getExtensionField("Field ID")
Hope this helps
Regards,
Immanuel
Similar Messages
-
Master Agreement- Line Item- Plant- Org Unit
Hi ,
Trying to get OrganisalUnit object associated with a plant using below code (Master Agreement-Line Item Tab)
lineItems=doc.getLineItems();
for(int i=0;i<lineItems.size();i++){
lineItem=lineItems.get(i);
material=lineItem.getMaterialObjRef();
materialHome=IBeanHomeLocator.lookup(session,material);
materialBean=materialHome.find(material);
plant=materialBean.getPlantObjRef();
plantHome=IBeanHomeLocator.lookup(session,plant);
plantBean=plantHome.find(plant);
businessUnitCollection=plantBean.getCollectionMetadata("COLLN:3:647").get(plantBean);
for(int i=0;i<businessUnitCollection.size();i++){
businessUnitRow=businessUnitCollection.get(i);
businessUnitCollection object size is 1. But the object is null.
Please help!
Goverdhan TotawarGot response from e-sourcing tech team. getCollectionMetadata can not be used for getting collection table.
Since the ORG Unit is standard object provided by esourcing, if an API method is not exposed we need to log a ticke, and SAP will provide a standard method. -
Unable to capture the value of vbrk-vbeln value from VF02
Hi All,
am printing form from VF02 ,,,once i execute the VF02 , and select Billing Document -> Issue Output to option .., my printi program gets triggered ,......,
but in my print program am unable to capture the value of VBRK-VBELN which i have entered in the VF02 tcode..
any other table the value of VBELN is stored???
pls help me out with the alternatives...
thanks
johnHi Dhiraj
One doubt how the value is populating in the NAST in the Print Program . While debugging i'm getting the Values from NAST but i want to know from where NAST is loading with these data.
Thanks
Bintu -
Troubles with multiple ESLL-SRVPOS in the same outline agreement line item!
Hi all,
Currently have an issue where the same service master is being used multiple times in a single outline agreement line item (set up with different groups in the service specifications with different rates).
This is causing issues with drawing services into purchase orders.
Eg: In ME57 when creating a PO from a PR, in the include LMLSPF5J /SEARCH_SRVPOS_CONT/ the system is checking if ESLL-KNT_INTROW is empty (which in my case it is, and message SE361 is displayed).
The main thing thats happening is that ESLL_KNT_PACKNO and ESLL_KNT_INTROW, which hold the reference data to the outline agreement in the PO should get filled with the packno and introw from the oa service line but it isnt happening.
I'm thinking of creating a validation so that the same service service number (ESLL-SRVPOS) CANNOT be used in the same outline agreement line item.
Wondering if anyone has had this same issue and what path they went down to resolve it.
Any ideas would be appreciated.
Timhi
u cannot do this because different line items cannot be in same cell as they are variable and only one field can be there ata atime in one column while creating field catalog
<b>u can do one thing. corresponding to sales order u can display its line items ion the secondary list and would make more sense also. for this make ur sales order number as HOTPOT on click of which will display its corres line items </b>
regards
ravish
<b>reward if useful</b>
Message was edited by:
ravish goyal -
Add field 'asset' in sales order line item account assignment tab
Hi,
I would like to add the following field: 'asset' in sales order line item account assignment tab.
I can enter order, or wbs, but not Asset.
How can I make this field visable?
Anybody?
thanks,
klundert
Edited by: Eric Van Zundert on Oct 30, 2010 8:43 AMHi
There is perform which moves the values to VBAP field.
This PRCTR field is stored in VBAP (i.e., SO line item table)
USEREXIT_MOVE_FIELD_TO_VBAP
Hope it works.
VVR -
Substitutions field Tax Code MWSKZ in Line Item
I need to do substitution for field Tax Code MWSKZ at line item when doing FI posting. However, I cannot find this subtitution field in OBBH Boolean class 009.
How can I solve this? Is there any BADI or user exit that serve the same purpose?
It's kind of urgent as I tried to find the solution for few days but I couldn't get any.
Edited by: Irene Sam on Sep 24, 2008 3:07 PMhi,
goto gs01 transaction,give some name to ur step.
give the table name and field name.
then u can create a specific value set for that field.
save.
now u can use this set to define conditions for ur fields in obbh transaction. -
To split the payment document value as per the line items of the P O
To split the payment document value as per the line items of the purchase order in the period of payment, so that the payment amounts are measured against the Capex order assigned as account assignment in the purchase order.(Account assignment tab for the individual line item in the PO.
Example:
Inputs:
Purchase Order 3100012345, line item 10 value 6000 line item 20 value 4000
VAT @10% , account assignment for PO line item 10(Internal Order no 10001) & line item 20 Internal Order 10002) G/ R no 5105105101 for Rs10,000.
The I/R doc 501501501 appears as follows: (MIRO)
Line 10: Value Rs 6,000
20: Value Rs 4,000
VAT Rs 600
Rs 400
Total Rs11, 000
Withholding Tax Rs 1,100
The accounting entry for MIRO happens as follows: doc 2102102101
GR/IR Dr Rs 10,000
VAT Dr Rs 1.000
Vendor Cr Rs9, 900
TDS due Cr Rs1, 100
The business expects the payment report as follows:payment doc 2001200101
PO Line item Internal Order MIRO Invoice Payment Payment period Amount
A/c doc number doc number
3400012345 10 10001 5605605601 2102102101 2001200101 001/2009 5940
3400012345 20 10002 5605605601 2102102101 2001200101 001/2009 3960
Currently we are able to show the amounts as Rs 6000 for line item 10 & Rs 4000 for line item 20.
The problems faced.
1. The VAT line items are auto created, hence the reference of purchase order number and line item are not available. So the VAT portion which is part of payment liability does not get reflected against the PO.(not able to show the VAT portion , when we try to show the payment amount per PO line item.)
2. The withholding tax is also a problem; WHT is not calculated and assigned per line item. It is calculated on the total amount of basic and VAT. Because of these reasons, the payment could not be shown properly according to the line item of the purchase order.
3. When part payment is made, against invoices, there is no provision to assign a payment amount against a particular line item. Further, when final payment is made in different period, the clearing document will get generated. That adds to the complexity of differentiating full payments and part payments final clearing.
4. When residual payment is made, a new line item is created. Here assignment of Purchase order line item against payment for residual items become a problem.
5. Many a times advance payments are made. Later the invoice is created and balance payment is made. In those situations, the clearing document creates one more line item and makes payment for the balance item. This adds complexity in bringing balance payment alone and to split as per the purchase order line item. The clearing document number system is multi dimensional. It creates two line items for the same item (one at the time of advance and another the time of clearing.)
6. When full payment is made, the payment document number and clearing document numbers are same. In cases of subsequent or partial or residual payment, the document numbers are different. Because of this, the part payment amounts are shown in the period, where the final payment and clearing are made.
Please suggest a way to split the payment amount in the exact posting period with all the considerations given above.
Regards
Sundararajan
Edited by: Sundarajan Venkatachari on Sep 30, 2009 11:04 AMHi,
See Note 301077 - User exits for the interface to accounting, although I think that there isn't this kind of option. Note 429117 - Collective note advice note SD-FI interface will be useful too.
I think that SAP Note 1085921 - Document split perhaps will help you
Regards
Eduardo -
BADI/user exit to be used EIPO-TEXT1 field of the outbound delivery line item?
Hi ABAPERS,
Need some help on an enhancement with reference to outbound delivery in SCM module.I have a requirement for an enhancement to ensure that the License Check is performed for each Delivery Item based on the Material`s Export Control Parameters and updating the license number identified against each of the line item in the outbound delivery in a predetermined field.
Basically, Using enhancement, find the appropriate License based on the information fetched from the Delivery Document and check if this is matching with the available License Information. Then the appropriate License fetched should be visible in the License Log of the Delivery Document.
The valid License No. fetched should be updated at the Delivery Document Item – Foreign Trade – Comments Tab-Description Field 1.(ie. populate the license T606Z-GENNR in EIPO-TEXT1 field of the outbound delivery line item.).
Could you please advise on the BADI/user exit to be used in this case. Request your inputs.I found the solution myself. I was actually not needing a user-exit to do this. I just simply solved it by using function modules READ_TEXT and SAVE_TEXT in a customer program.
Regards. -
How to make extended field mandatory in Master Agreement
Hello All,
I am new to SAP CLM, and I have requirement where one extended field in master agreement needs to be made as mandatory field.
I tried in extension definition but check box to make it required is disabled and I am unable to find other way to do it.
Can some one help me and Please let me know how make extended fields mandatory in CLM.
Regards,
PrabhatHi
This could be achieved using Page Customization.Go to Setup-> User Interface-> Page Customization, open master agreement object (create new with UI ID:contracts.contract.ui.buyside.default if doesn't exist ) and add a new customization for extended field with Property set to Required.
Regards
Mudit Saini -
Unable to read field value from main table - unexpected socket read error
Hi Friends,
While executing the below code, I am able to get the value of the field 'id' but i am unable to get the value for the 'materialnumber' field. i am getting the below exception
+com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ProtocolException: java.io.IOException: Unexpected socket read. Result is -1.
at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:158)
at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(RetrieveLimitedRecordsCommand.java:157)
at updaterecords.main(updaterecords.java:126)
Caused by: com.sap.mdm.internal.protocol.manual.ProtocolException: java.io.IOException: Unexpected socket read. Result is -1.
at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:100)
at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:146)
... 2 more
Caused by: java.io.IOException: Unexpected socket read. Result is -1.
at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:59)
at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:417)
at com.sap.mdm.internal.net.ConnectionImpl.nextMessage(ConnectionImpl.java:501)
at com.sap.mdm.internal.net.ConnectionImpl.receiveMessage(ConnectionImpl.java:472)
at com.sap.mdm.internal.net.ConnectionImpl.send(ConnectionImpl.java:209)
at com.sap.mdm.internal.net.ReservedConnection.send(ReservedConnection.java:105)
at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:97)
... 3 more+
import com.sap.mdm.commands.AuthenticateUserSessionCommand;
import com.sap.mdm.commands.CommandException;
import com.sap.mdm.commands.CreateUserSessionCommand;
import com.sap.mdm.commands.DestroySessionCommand;
import com.sap.mdm.commands.GetRepositoryRegionListCommand;
import com.sap.mdm.data.Record;
import com.sap.mdm.data.RegionProperties;
import com.sap.mdm.data.ResultDefinition;
import com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand;
import com.sap.mdm.ids.TableId;
import com.sap.mdm.net.ConnectionException;
import com.sap.mdm.net.ConnectionPool;
import com.sap.mdm.net.ConnectionPoolFactory;
import com.sap.mdm.schema.FieldProperties;
import com.sap.mdm.schema.RepositorySchema;
import com.sap.mdm.schema.commands.GetFieldListCommand;
import com.sap.mdm.schema.commands.GetRepositorySchemaCommand;
import com.sap.mdm.search.Search;
import com.sap.mdm.server.DBMSType;
import com.sap.mdm.server.RepositoryIdentifier;
public class updaterecords {
public static void main(String[] args) {
try {
String serverName = "159.112.6.26";
ConnectionPool connections = null;
try {
connections = ConnectionPoolFactory.getInstance(serverName);
} catch (ConnectionException e) {
e.printStackTrace();
return;
// specify the repository to use
// alternatively, a repository identifier can be obtain from the GetMountedRepositoryListCommand
String repositoryName = "DEMO";
String dbmsName = "MDMD";
RepositoryIdentifier reposId = new RepositoryIdentifier(repositoryName, dbmsName, DBMSType.ORACLE);
// get list of available regions for the repository
GetRepositoryRegionListCommand regionListCommand = new GetRepositoryRegionListCommand(connections);
regionListCommand.setRepositoryIdentifier(reposId);
try {
regionListCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
RegionProperties[] regions = regionListCommand.getRegions();
// create a user session
CreateUserSessionCommand sessionCommand = new CreateUserSessionCommand(connections);
sessionCommand.setRepositoryIdentifier(reposId);
sessionCommand.setDataRegion(regions[0]); // use the first region
try {
sessionCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
String sessionId = sessionCommand.getUserSession();
// authenticate the user session
String userName = "meter1";
String userPassword = "meter1";
AuthenticateUserSessionCommand authCommand = new AuthenticateUserSessionCommand(connections);
authCommand.setSession(sessionId);
authCommand.setUserName(userName);
authCommand.setUserPassword(userPassword);
try {
authCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
GetRepositorySchemaCommand cmd=new GetRepositorySchemaCommand(connections);
cmd.setSession(sessionId);
try{
cmd.execute();
}catch(CommandException e){
System.out.println(e.getLocalizedMessage());
RepositorySchema repsch=cmd.getRepositorySchema();
// the main table, hard-coded
TableId mainTableId = new TableId(1);
// specify the result definition (what to retrieve); in this example, nothing
ResultDefinition rd = new ResultDefinition(mainTableId);
// select all records
Search search = new com.sap.mdm.search.Search(mainTableId);
//get fields
GetFieldListCommand getFieldListCommand = new GetFieldListCommand(connections);
getFieldListCommand.setSession(sessionCommand.getUserSession());
getFieldListCommand.setTableId(mainTableId);
try {
getFieldListCommand.execute();
} catch (CommandException e) {
System.out.println(e);
FieldProperties[] lookupFields = getFieldListCommand.getFields();
// add fields to records to retrieve
rd.addSelectField(repsch.getFieldId("Products","Id"));
rd.addSelectField(repsch.getFieldId("Products","MaterialNumber"));
// retrieve the records
RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(connections);
limitingCommand.setSession(sessionId);
limitingCommand.setResultDefinition(rd);
limitingCommand.setSearch(search);
//limitingCommand.setPageSize(2000);
try {
limitingCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
System.out.println("Record count is " + limitingCommand.getRecords().getCount()+"\n");
Record[] records=limitingCommand.getRecords().getRecords();
System.out.println(records[0].getFieldValue(repsch.getFieldId("Products","Id"))+ " \n");
System.out.println(records[0].getFieldValue(repsch.getFieldId("Products","MaterialNumber"))+ " \n");
// finally destroy the session
DestroySessionCommand destroySessionCommand = new DestroySessionCommand(connections);
destroySessionCommand.setSession(sessionId);
try {
destroySessionCommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
} catch (Exception e) {
System.out.println(e.getLocalizedMessage());
e.printStackTrace();
Kindly let me know where i am going wrong. MaterialNumber field is a TEXT not a lookup table field. Above fields are from the main table.
Thanks,
RaagsHi Friends,
I got the solution. It was the error because of not having a the below statement.
limitingCommand.setPageSize(1);
As i havent used that statement, it was trying to get 1000 records, and i dont know exactly what makes this to get that error. Anyhow., As i want to use for updation, i cn live with one record.
Thanks,
Raags -
Unable to capture return values in web services api
At the time of login to web services if my server is down ,
it returns following error :
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1438)
at java.lang.String.substring(String.java:1411)
I want to capture this error so that i can try another server to login. how do i capture this error
Another place where i want to capture the return Value is when i look for a report on the server
rh = boBIPlatform.get("path://InfoObjects/Root Folder/"src_folder"/" + reportName +
"@SI_SCHEDULEINFO,SI_PROCESSINFO" ,oGetOptions);
oInfoObjects = rh.getInfoObjects();
CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
Here if the report is not there on the server , it returns a null handler exception.
but if i try catching it by checking my responsehandler is null like rh == null it does not catch it.
Any help will be appreciated
thanks
Rakesh GuptaTed : i have two cases
1) server = server_st.nextToken();
providerURL = "http://"server"/dswsbobje/services";
sessConnURL = new URL(providerURL + "/session");
Connection boConnection = new Connection(sessConnURL);
Session boSession = new Session(boConnection);
EnterpriseCredential boEnterpriseCredential = new EnterpriseCredential();
boEnterpriseCredential.setLogin(userid);
boEnterpriseCredential.setPassword(pwd);
boEnterpriseCredential.setAuthType(auth);
SessionInfo boSI = boSession.login(boEnterpriseCredential);
I have got a list of servers running web servcies stored in my tokens. when i pass the first server name say " test:8080" and that server is down , i want to catch somewhere in the code above that it did not get the connection so that i can loop back and try with the second server say test1:8080
This is for failover purposes.
at present when i was trying to capture return value of boSI it breaks giving the error
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1438)
at java.lang.String.substring(String.java:1411)
2nd case :
I am geeting reports from the server and scheduling them:
i run the following code which works fine if reports is there
rh = boBIPlatform.get("path://InfoObjects/Root Folder/"src_folder"/" + reportName +
"@SI_SCHEDULEINFO,SI_PROCESSINFO" ,oGetOptions);
oInfoObjects = rh.getInfoObjects();
CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
Here if the report is not there on the server then i should be able to catch from the response handle rh that it has got a null value.
but rh does not return a null value
the code ultimately throws a null handle at the following line
CrystalReport = (CrystalReport)oInfoObjects.getInfoObject(0);
i am not able to catch the null value there also.
hope you got my issue. -
Hi,
the 2 items are like
<af:inputText label="User"
binding="#{backingBeanScope.backing_Login4.it1}"
id="it1"/>
<af:inputText label="Password"
binding="#{backingBeanScope.backing_Login4.it2}"
id="it2" secret="true"/>
why can't I capture their values by these?
loc_it1 = (String)this.currRec.getAttribute("it1");
loc_it2 = (String)this.currRec.getAttribute("it2");
as I check their values are really "null"Here is the mananged bean
package view.backing;
public class Login4 {
private RichPanelStretchLayout psl1;
private RichForm f1;
private RichDocument d1;
private RichPanelBox pb1;
private RichPanelFormLayout pfl1;
private RichPanelFormLayout pfl2;
private RichPanelGroupLayout pgl1;
private RichPanelFormLayout pfl3;
private RichSpacer s1;
private RichInputText it1;
private RichSpacer s2;
private RichInputText it2;
private RichSpacer s3;
private RichPanelGroupLayout pgl2;
private RichCommandButton cb1;
private ViewRowImpl currRec;
private String loc_it1, loc_it2;
private RichCommandButton cb2;
private RichCommandButton cb3;
public void ChkConn() {
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
loc_it1=this.getIt1().getValue().toString();
loc_it2=this.getIt2().getValue().toString();
String url = ...
Connection conn =
DriverManager.getConnection(url, loc_it1, loc_it2);
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("select sysdate from dual");
if (rs.getRow()==0) {
conn.close();
} catch (Exception e) {
there is no exception happened when running the app but I captured that their values r null -
Unable to delete master data line items - Master data object CCHIUSRAM
Hello
We have an issue with the Master data Object CCHIUSRAM - CC Hier User Auth Maintenance. It has only master data and no texts no hierarchy. It is not time-dependent. It has /BIC/PCCHIUSRAM, /BIC/SCCHIUSRAM as database table only. This master data is not being used in any infoproviders.
In development client we are able to delete the line items of the Master data along with entering line items. RSRV check gives green for all checks.
In Test / Production client we are not able to delete the line items of the Master data. We are only able to enter master data lines and if we change any item then it creates another entry in the table.
Tried SE14 & RSDMD_DEL_MASTER_DATA - both does not help.
Did ST05 trace, could not find something concrete.
If any one has faced such an issue with any master data item then a response is much appreciated. It has become a bottleneck for us.
Many Thanks in advance
Pradip ParmarThanks for the response.
I can do this in EBD, but it is working fine in EBD. I cannot do this activity in EBP / EBT as the systems are closed and I cannot activate directly in EBT / EBP.
Besides, I have recently transported active versions of the object in EBT / EBP all again twice to see if it changes anything.
My guess is that, there is something stupid may be I am missing somewhere.
Any help is much appreciated.
Thanks -
Changing condition type values in Billing Doc Line Items
Hi All,
I want to change the value of condition types JLST and JCST to zero in the line items of proforma invoices. How can I do this?
Any function module or BAPI? Should I go for BDC?? I tried to find user exits. What can be the optimal way to do this?
Please help.
Thanks in Advance
- Neha.Hi Neha,
You pass 0 (zero) to the field COND_VALUE in CONDITIONSIN table alongwith other relevant data.
And pass 'X' to the field COND_VALUE in CONDITIONSINX.
hope it helps.
saroj -
Trading Partner field not transferred to receiver line items in CO.
Hello all,
We were facing the problem of the Trading partner field VBUND not getting reflected in the receiver line items in CO & PCA. to get around this problem SAP note 543818 & 547387 was implemented.
This solved the problem in CO while the problem in PCA persists. If anybody could suggest an alternative it would be great
thanks
nelsonHi
when you post a enjoy transaction like in FB50, click on "More Data" if the Trading partner is an optional field in the GL master data you can input there as well.
Maybe you are looking for
-
Does TLF except text input on iOS devices? Can someone point me to documentation about this? Thanks.
-
When replacing a PDF page on a fillable form in Acrobat 8 with a page from another flat PDF form also created in Acrobat 8, a letter may be dropped from the middle of any given word. Has anyone else experienced this problem and is there a fix?
-
Can I Create Folders In Pages???
I need to organize my Pages files on my iPad in different folders. Is that possible?
-
I would like to hear that these functions are known to work with 7.6.130.0 in this configuration. The customer will have a pair of primary controllers deployed in separate telco closets. Each primary controller consists of a pair of WLC 5508 configur
-
HT4623 I upgraded my phone and now I can't use my App Store.
It says "Account not in this store" Your account is not valid for use in the US store. You must switch to the Canadian store before purchasing. How do I do this??