Quantcast
Channel: SCN: Message List
Viewing all 10665 articles
Browse latest View live

Re: Archive records from /AIF/PERS_RUN

$
0
0

Hi,

 

as far as I know in AIF you have the archiving object /AIF/PERSX which has access to some tables. Among them you will find /AIF/PERS_XML but also the index tables(standard and custom).  So for /AIF/PERS_XML and custom aif index tables you can use this archiving object.

The table /AIF/PERS_RUN is not in the object /AIF/PERSX, but I think you can define your own archiving object and then develop your own programs for archiving based on /AIF/PERSX_XXX like the write program /AIF/PERSX_WRI.

 

Best regards,

Ionut


Re: Insert issue in Oracle backend Using Odata service

$
0
0

jitendra kansal's Profile | SCN

 

 

 

Thanks Jitendra

 

                   After changing datatype in String it works for me. But as per requirement now they want Datetime format like 22-MAY-2015 07:00:00. For this we change Oracle Backend datatype to VARCHAR2 and in entity its String it works.But because of this change it shows error in Delta token as we are getting delta in below format

 

<linkrel="delta"href="WORK_ORDER_INPROGRESS?!deltatoken='2015-05-16'"/>

 

 

-------------------------------------------------------------------------------------------------------------------------------

import com.sap.gateway.ip.core.customdev.util.Message;

import org.apache.olingo.odata2.api.uri.UriInfo;

import java.util.*;

import org.apache.olingo.odata2.api.edm.EdmEntitySet;

import org.apache.olingo.odata2.api.uri.NavigationPropertySegment;

import com.sap.gateway.core.ip.component.commons.ODataMethod.*;

import com.sap.gateway.ip.core.customdev.logging.*;

import com.sap.gateway.core.ip.component.commons.*;

import com.sap.gateway.ip.core.customdev.api.*;

import java.text.SimpleDateFormat;

 

 

// MAPPING

def Message processRequestData(Message message) {

 

 

  //If pagination is implemented in processRequestSQL set IS_TOP_HANDLED and IS_SKIP_HANDLED

    message.setHeader(ODataCamelExchangeHeaders.IS_TOP_HANDLED.toString(), true);

  message.setHeader(ODataCamelExchangeHeaders.IS_SKIP_HANDLED.toString(), true);

 

 

 

 

return message;

}

 

 

 

 

// Processs SQL

def Message processRequestSQL(Message message)

{

  //Get the SQL statement contained in message body

 

 

  String sqlStatement = message.getBody();

   def uriInfo = message.getHeaders().get(ODataExchangeHeaderProperty.UriInfo.toString());

 

   def map = new HashMap();  map = uriInfo.getCustomQueryOptions();

   def deltaToken = map.get("!deltatoken");

 

   //check if $expand=OperationSet is used

   String targetSetName = "";

 

   def expand = new ArrayList();

   def navProp = new ArrayList();

 

   expand = uriInfo.getExpand();

   if (expand.size() == 1) navProp = expand.get(0);

   if (navProp.size() == 1) targetSetName = navProp.get(0).getTargetEntitySet().getName();

   boolean isExpand = targetSetName.equals("WORK_ORDER_PICTURES");

 

  //Create the query and sub query

   String AND = " AND ";

   String WHERE = " WHERE ";

   String MO_CHANGEDATE = " TRUNC(UPDATED_DATE) >= ";

   String OP_CHANGEDATE = " OR TRUNC(UPDATED_DATE) >= ";

 

 

   //Modify the SQL statement

   String modifiedSqlStatement = "";

   def entitySet = uriInfo.getStartEntitySet();

   def odataMethod = message.getHeaders().get(ODataExchangeHeaderProperty.ODataMethod.toString());

   modifiedSqlStatement += sqlStatement;

   if (odataMethod.toString() == "GET_FEED")

   {   entitySetName = entitySet.getName();

    if (entitySetName == "WORK_ORDER_INPROGRESS")

    {

  

    }

  //Check if a deltatoken is defined in the URL query options

  //Returns all entities of

   if (deltaToken != null && deltaToken.length() > 0)

   {

   if (sqlStatement.toUpperCase().indexOf(WHERE) != -1)

   {

    modifiedSqlStatement += AND;

   }

   else

   {

    modifiedSqlStatement += WHERE;

   }

  modifiedSqlStatement += "(";

    modifiedSqlStatement += MO_CHANGEDATE;

  if (isExpand)

  {

    modifiedSqlStatement += deltaToken;

    modifiedSqlStatement += OP_CHANGEDATE;

  }

 

  modifiedSqlStatement += "DATE ";

  modifiedSqlStatement += deltaToken + ") ";

 

  }

 

   }

 

   //For pagination we use the functionality of the database

   Integer skip = uriInfo.getSkip();

   Integer top = uriInfo.getTop();

 

  

      //For pagination we use the functionality of the database

    if (skip != null && skip.value > 0)

   {

   modifiedSqlStatement = "";

  //  modifiedSqlStatement += " offset " + skip.value + " rows";

   modifiedSqlStatement += "SELECT * from( select m.*, rownum r from work_order_inprogress m) where r > " + skip.value;

  // where r > 10 and r < 21

   }

    if (top != null && top.value > 0 )

    {   top = skip + top;

    modifiedSqlStatement += " and r <= " + top.value;

    modifiedSqlStatement += "and ACTIVE <> 0";

    } 

 

 

 

//Set the message body back with the modified SQL statement

  message.setBody(modifiedSqlStatement);

   //Logger

 

// log.logErrors(LogMessage.TechnicalError, modifiedSqlStatement);

  return message;

 

  }

 

 

 

  

/* In this method ,the message object will contain the resultSet(response HashMap).

* If certain values are to be calculated based on the result,user can do so here.

*  Delta token scenario is illustrated in the sample. */

def Message processResponseResult(Message message)

  {

  UriInfo uriInfo = message.getHeaders().get(ODataExchangeHeaderProperty.UriInfo.toString());

  def entitySet = uriInfo.getStartEntitySet();

  String entitySetName = entitySet.getName();

 

  //Check if the $expand=OperationSet statement is used in the request URL.

  String targetSetName = "";

  def expand = new ArrayList();

  def navProp = new ArrayList();

  expand = uriInfo.getExpand();

  if (expand.size() == 1) navProp = expand.get(0);

  if (navProp.size() == 1) targetSetName = navProp.get(0).getTargetEntitySet().getName();

  def method = message.getHeaders().get(ODataExchangeHeaderProperty.ODataMethod.toString());

  //Call the sample method for implementing delta token and deleted item detection. As the JDBC result set is differently when using the $expand statement we have to check for it.

  if (method == ODataMethod.GET_FEED)

  {

  if (targetSetName.equals("WORK_ORDER_PICTURES") && entitySetName.equals("WORK_ORDER_INPROGRESS"))

  {    deltaHandlingExpand(message,entitySet);

 

  }

   else if ("WORK_ORDER_INPROGRESS".equals(entitySetName))

    {

   deltaHandling(message,entitySet);

    }

  

    }

  return message;

 

}

 

 

 

 

  /* calculating delta token and tombstones */

  def void deltaHandling(Message message, def entitySet)

  {

  def deletedItems = new ArrayList();

  def resultEntities = new ArrayList();

  String deletedColumn = "ACTIVE";

  def currentTokenValue = new Date();

  def highestTokenValue = new Date();

  def token = "";

  def date = new Date();

  def dataSourceResponse = new ArrayList();

  dataSourceResponse = message.getBody();

  def customMap = new HashMap();

  def uriInfo = message.getHeaders().get(ODataExchangeHeaderProperty.UriInfo.toString());

  customMap = uriInfo.getCustomQueryOptions();

  def deltaToken = customMap.get("!deltatoken");

  //Segregating the result set into deleted items and otherwise

  if (deltaToken != null && deltaToken.length() > 0)

  {

  for (def i = 0; i < dataSourceResponse.size(); i++)

  {    if (dataSourceResponse.get(i).get(deletedColumn) == 0)

  deletedItems.add(dataSourceResponse.get(i));

  else

  resultEntities.add(dataSourceResponse.get(i));

  }

   message.setBody(resultEntities);

    message.setHeader(ODataCamelExchangeHeaders.DELETED_ENTITIES.toString(), deletedItems);

  }

  //Parse through the result set to get the latest change date

  for (def i = 0; i < dataSourceResponse.size(); i++)

  {

  if (dataSourceResponse.get(i).get("UPDATED_DATE") != null)

  {

 

  currentTokenValue = dataSourceResponse.get(i).get("UPDATED_DATE");

   if (currentTokenValue > highestTokenValue)

    highestTokenValue = currentTokenValue;

  }

  }

 

 

  token = highestTokenValue.toString();

  def sdf = new SimpleDateFormat("yyyy-MM-dd");

 

 

   //Set new delta token to the message header

  message.setHeader(   ODataCamelExchangeHeaders.IS_DELTA_IMPLEMENTED.toString(), true);

  message.setHeader(ODataCamelExchangeHeaders.DELTA_TOKEN.toString(),sdf.format(highestTokenValue));

  }

 

 

  /* calculating delta token and tombstones when $expand is used*/

  def void deltaHandlingExpand(Message message, def entitySet)

  {

  def deletedItems = new ArrayList();

  def resultEntities = new ArrayList();

  String colDeletedMO = "C4";

  def currentTokenValue = new Date();

  def highestTokenValue = new Date();

  def token = "";

  def date = new Date();

  def dataSourceResponse = new ArrayList();

  dataSourceResponse = message.getBody();

  def customMap = new HashMap();

  def uriInfo = message.getHeaders().get(ODataExchangeHeaderProperty.UriInfo.toString());

  customMap = uriInfo.getCustomQueryOptions();

  def deltaToken = customMap.get("!deltatoken");

  //Segregating the result set into deleted items and otherwise

   if (deltaToken != null && deltaToken.length() > 0)

   {

    for (def i = 0; i < dataSourceResponse.size(); i++)

    {

    if (dataSourceResponse.get(i).get(colDeletedMO) == 0)

    deletedItems.add(dataSourceResponse.get(i));

    else

    resultEntities.add(dataSourceResponse.get(i));

    }

  message.setBody(resultEntities);

  message.setHeader( ODataCamelExchangeHeaders.DELETED_ENTITIES.toString(), deletedItems);

  }

   //Parse through the result set to get the latest change date

   for (def i = 0; i < dataSourceResponse.size(); i++)

    {

    if (dataSourceResponse.get(i).get("C7") != null)

    {    currentTokenValue = dataSourceResponse.get(i).get("C7");

  if (currentTokenValue > highestTokenValue)

  highestTokenValue = currentTokenValue;

  }

    if (dataSourceResponse.get(i).get("C16") != null)

   {    currentTokenValue = dataSourceResponse.get(i).get("C16");

   if (currentTokenValue > highestTokenValue)

  highestTokenValue = currentTokenValue;

   }

   }

 

    def sdf = new SimpleDateFormat("yyyy-MM-dd");

  

  //Set new delta token to the message header

    message.setHeader(   ODataCamelExchangeHeaders.IS_DELTA_IMPLEMENTED.toString(), true);

    message.setHeader(ODataCamelExchangeHeaders.DELTA_TOKEN.toString(),sdf.format(highestTokenValue));

  

    }

 

  /* Here the message object will have data after all the post processing.

  *  Can be used e.g. If, $expand was present in the URI and the direct resultSet is unclear to the user. */

  def Message processResponseData(Message message)

   {

   return message;

  }

 

----------------------------------------------------------------------------------------------------------------------------------

Logic of bop bg job in apo-gatp

$
0
0

Dear Experts,

 

There is a bop job running in apo on weekdays in bg (background run) -- which could also be run interactively, if the need arises. This bg bop run is scheduled to run at 8am, 12noon, 5pm on weekdays.

 

While trying to analyse the log of this bop job, I came across a very attractive kind of logs  which looks cool, but unable to decipher it much.

 

Was wondering if could get some help regarding this & a few more follow up questions.

 

The screenshot below shows a list of back orders which are being processed on 14-May:

 

1) if you check the line-item #83, it shows a sales order# 7833 with a material of 308018, with 3 Red Buttons & 2 normal arrows & no processing-- I checked the sales order# 7833 in va03 & it's an old open order which was created on 06-Mar with a req. deliv. date of 16-Apr, but has no stock & hence its still open  qty of 1.0 unit -- this bop job hence doesn't confirm anything against this & this order remains open with 3 Red Buttons & 2 normal arrows. Is this analysis correct?

 

2) Now coming to the next line-item #84, its hows a sales order#7847  with a material of 3-0054, with a slate-icon-12 & 2 green button -- showing it confirms 500 EA today. This is again an old open order which was created on 06-Mar with a req. deliv. date of 16-Apr, this has stock & is now getting confirmed by BOP run everyday- last few runs --- why is the Deliv. Job not creating the Deliv. then & why does this keep getting processed in the daily BOP job? Also what does the down-ward pointing arrow & normal arrow signify here?

 

3) Next going to line-item #88, sales order#18977, with a material of 97996 for 7290 Qty of order, it shows a slate-12-icon, yellow icon & a red icon-- what does these 3 mean? I can see that this sales order# 18977 was created on 09-Apr with a req.deliv.date of 06-May. However the original order quantity of 41.057 had already seen many partial deliv. & currently only 23.588- is remaining open, out of which the BOP is confirming 7,299 is getting confirmed in the current run.. right? What does the yellow icon mean here & what does the upward ticking arrow mean?

 

One more point to note is it shows 10 BM... why 10 BM?

Untitled.jpg

Please let me know your thoughts.

Rgds.

Sooraj

Gap between two screen fields in 0185 infotype ?

$
0
0

Dear SAP Guru's,

 

When I am enhancing the standard infotype 0185 with additional fields using PM01 single screen tab,

huge gap is coming, because 3305 screen fields are existed on 0185 infotype,


I tried to enhance the 3305 by adding the fields but still those fields are not displaying on it, 3305 having no single and list screen,

how to overcome with this gap.


Thanks in advance.


Regards,

Syed taj.

Re: SAP Open/Publish/Launch grayed out in dashboard tool

$
0
0

Hi Pranav,

 

Also check the SAP GUI installation.
First install the SAP GUI and later install Dasshboards.

 

Installing it in this order helps sometimes..

Re: how to select range through combo box?

$
0
0

There is no such component where you can specify the start and end value in dashboards.
You will have to define the prompts as start value and end value as suggested by Naras above.

Re: Different vendor use different sample procedure on same material

$
0
0

you can certainly use vendor specific inspection plan as mentioned above but you have to maintain inspection plan for each material vendor combination.

Alternatively use two MIC with different sampling procedures in the inspection plan. Quality inspector manually can decide to record  results for correct mic with correct sampling procedure. This approach although not he beast, can save lot of master data maintenance issues.

SAP WEBSERVICES AND CONSUMING IN PHP

$
0
0

Dear Experts,

 

Someone help me figure out where to change WSDL policy since I am getting below error while trying to consume in PHP.

 

Below is the error message I am getting on php.

 

---------------------------------

 

PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Unknown required WSDL extension 'http://schemas.xmlsoap.org/ws/2004/09/policy' in /var/www/html/sdp/mpesa1.php on line 12

 

--------------------------------

 

I am working on a project to Integrate Mobile payments (real time payments) with SAP ERP using PHP.

 

 

Someone help me.

 

 

Dominic K. Kebenei

 

+254 724 875 121


Re: SAP IQ out of space in IQ_SYSTEM_MAIN DBSpace

$
0
0

I would use the alter table move command. It allows you to move objects from one dbspace to another.

 

Mark

Re: Fiori Order from Requisitions: Limitations and Filters

$
0
0

Dear Simran,

 

You can refer the details from here: Fiori Apps Library

 

The features of this App are as below:

 

Display approved purchase requisitions that are not yet assigned to suppliers

Assign suppliers to a selected set of purchase requisitions

Select the relevant supplier if multiple suppliers can deliver the product

Bundle a selected set of purchase requisitions by supplier and simulate the purchase orders (one purchase order per supplier)

Review simulated purchase orders

Create purchase orders

 

I can see the first 2 steps are done in your case, but 3rd step is done wrongly?

Please refer the details from the link and try accordingly.

 

Thanks

Prem

Re: How to get a field by validating other field in a table in webdynpro

$
0
0

Hello Tirup,

 

Answer to your questions.

 

1.  You can add the conditions to populate the 5th field based on the 4th field inside the LOOP.

 

LOOP at LT_ND_TABLE into wa.

    

     case wa-(4th field).

     when '1'.

      wa-(5th field) = "Val1".

      when '2'.

      wa-(5th field) = "Val2".

     when OTHERS.

    wa-(5th field) = "OTHERS".

     endcase.

    

     if wa-WERKS is not INITIAL.

       insert ZSILO_CREAT from  wa.

     else.

       CLEAR wa.

     ENDIF.

ENDLOOP.


2. To set the number of records needs to be displayed/extend the number of records in table.


For display only, you can set the number of visible row properties to -1. But it leads to performance issue.


To extend the number of rows, you can add a button to add a empty record at the end of table. when user clicks on the button, just write the below logic to add the record


DATA lo_table TYPE cl_wd_table.

* Pass the table name

 

lo_table ?= view->get_element( ID = 'name_of_table_in_the_view').

*Get the number of entries in table

*Add 1 to number of entries and pass it to below code

lo_table->SET_VISIBLE_ROW_COUNT(value = 'number of entries').

 

Hope this may help you.

 

Thanks,

Sudar


Re: Enhancement/BADI on IW22

$
0
0

If you don't wanna go via the route of user exits, you can check 'BADI*NOTIF*SAVE' at SE18. Also there is a BTE (Business Transaction Events) for Notification. Go to SE37 and check *BTE*NOTIF* and enhance it. Hope it helps.

 

 

Cheers

Naveen

Re: Calender day,paid day and working day should reflect in RT in payslip

$
0
0

HI,

 

Paid day's is coming wrong. Remove the PRINT operation from the PCR and then the result.

 

 

Add the PCR in the time subschema after ZLIT function.

 

Regards,

Sankarsan

Re: SFIN 2.0 update to SP1 taking too long

$
0
0

I am also phasing the same issue.

No solution found yet. sFin 2.0 is quite new. I am still searching and if found something then will update.

 

Sumit

Sales planning

$
0
0

Hi to everyone!

 

Could you help me to find where can user set the target for the sales plan in Cloud for Customer? I tried to create sales plan but the field 'target' was unchangeable. I also didn't find where I can create a new pipeline? Where can I set the sales targets for employees? I've found several reports but all of them show only fact or forecast.

 

Thanks in advance, Andrey.


Re: Rejected SKIP/DOL Lot Issue

$
0
0

Make sure DMR is set at Usage decision and you have entered the UD for first inspection lot.

 

Thanks

Re: OpenText Vendor Invoice Management: Usermap class

$
0
0

Hi Alfredo,

 

I had to freeze my dev currently on this point but I did not succeed in finding a solution here.

I will need to come back on this soon and I will have to find a solution.

 

If you would find it in the meantime.

 

Thanks

kr

Thomas

Re: mrp run

Re: SFIN 2.0 update to SP1 taking too long

$
0
0

Hi Sumit,

 

I`ve waited for another night and it ended. So I did not raise any support message.

For me this step was running ~30 hours.

 

Good luck,

Mike

Re: When extract files on NAS storage, other operations slow down significantly

$
0
0

It's really not a matter of which is responsible.  They all are.

 

What is the connection speed, latency, etc from the server machine to the NAS? How is it connected to the NAS?  NFS?  CIFS?  iSCSI? 

 

What is the maximum sustained rate at which the NAS can write to the disks?

 

Which platform is the IQ server on?  Have you tuned the os, network and any file system options? If so, how?

 

Have you tuned the NAS?  If so, how?

 

Are you current on the patches/firmware for all components?

 

jason

Viewing all 10665 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>