Quantcast
Channel: SCN : All Content - All Communities
Viewing all 8150 articles
Browse latest View live

how to add line feed to string for XML to ecxel?

$
0
0

Hey guys,

 

i write a report which creates an excel sheet via XML string. For this purpose i use the api IF_IXML_DOCUMENT.

Now i want to add some texts to the XML which should be displayed in the created excel in one cell. The text should be formated with line feeds (in excel ALT+ENTER). How can i do this? The method which i use to write the string to XMLis:

IF_IXML_DOCUMENT->create_simple_element( )

How can i put line feed to the string, which can be interpreted as line feed in created excel? Any idea?

I tried to convert my string to a xstring and concatenate the strings with '0A'. Later i converted the concatenated xstring back to a string.

This is not working.

Other ideas?

 

regards,

   M.


Asset Revaluation both Commercial & Tax Purpose via AR29N

$
0
0

Hi there,

 

Our organisation is going to implement asset revaluation both commercial and for tax purposes via AR29N. What we have configured are described below :

 

1. OABW

     Tick both book depreciation and tax balance sheet

          OABW.png

2.  AO90

     Account assignment for revaluation account assignment and account assignment for revaluation on depreciation

3.  OAYR

     Tick post revaluation

4.  AUFW

     Create revaluation measurement

5.  AFAMS

     Change base value to 24

     AFAMS.png

We then test the asset revaluation using AR29N with these parameters:

Current Net book value asset :          2.450.023.285

Asset value after new valuation :      3.700.000.000

Gain (Loss) :                                          1.249.976.715


On commercial side (the book depreciation), the output has been passed as below print screen :AR29N.png

AW01N for commercial side display as below print screen:

AW01N.jpg


However, the output for the tax purpose, (tax balance sheet) the revaluation ord.dep. did not appear, therefore the gain loss revaluation value was incorrect. Below is print screen AW01N for tax purpose.

AW01N Tax Purpose.jpg

Furthermore, the Asset Net Book Value become to high as the revaluation ord depr. was not properly calculated.



Below is the calculation used for Dep key fiskal (tax balance sheet)

AW01N Tax Calculation.png

 

 

Does anyone have any experience in asset revaluation on both commercial and tax purpose?

Is there any missed configuration in order the revaluation value on tax purpose accordance to its commercial ?

 

Any help will be greatly appreciated.

Thanks

 

 

Unable to enter Parameter ID for Data Element

$
0
0

Dear SAP Experts,

 

I create a parameter ID ZKONTO and want to assign it for data element KONTO.  I use the access key (provided by Basis Team) to modify object KONTO.  However, it seems the field Parameter ID is disabled in Further Characteristics tab.

 

You can see that I am in Change mode .  I would be grateful if you can suggest the solution.

 

Capture.PNG

 

 

According to this link https://help.sap.com/saphelp_nw73ehp1/helpdata/en/90/8d7307b1af11d194f600a0c929b3c3/content.htm,  it says that "A field can be filled with default values from SAP memory using a parameter ID. A screen field is filled automatically with the value stored under the parameter ID of the data element only if this was explicitly permitted in the Screen Painter. To specify the parameter ID, go to the Further Characteristics tab page and make the entry in field Parameter ID."

 

So I assign and enable GET parameter ID in Screen Painter but it is still no hope .

 

Capture1.PNG

 

 

Capture2.PNG

 

Best regards,

 

Danny

Internal table Creation

$
0
0

Hi All,

 

I have an internal table like as below.It contains an internal table inside as follows.

 

1.png

 

How to build a separate internal table which contains all the item details.

 

I tried  as follows.

 

Loop ABC into WA_ABC.

KYZ =  WA_ABC-Item.

Endloop.

 

I am getting only the C values as there is no append statement.Kindly help.

 

Ram

RMMRP000 (Tcode MDBT) :Manufacturer/Part Number item-> texts is concatenated without Semicolon

$
0
0


Hi All,

 

  Users are running program RMMRP000 ( Transaction Code MDBT) in background mode to create Purchase requisition.

The issue is if there are multiple Manufacturer/Part Number in TEXTS tab of ITEM, it is coming as continuous line.

 

The requirement is it should come separated by semicolon.

 

Ex: CAT/2379474CAT/ABCM-0DE4532CAT/0DE4532

  It should come as

 

CAT/2379474;CAT/ABCM-0DE4532;CAT/0DE4532;

 

Could you please help on how to do this with any enhancement/user exit.

 

Thanks,

Arpita

Split a string at special character(Tab character)

$
0
0

ABAP guru,

 

I tried to split a string at the tab character.

The following ABAP statements work fine when Unicode checks are deactivated.

data: W_TAB_FIELD(1) TYPE X VALUE '09'.

SPLIT W_LTEXT AT  W_TAB_FIELD INTO w_ltext1 w_ltext2 w_ltext3.

 

But if I checked the box "Unicode checks are active", the statements above will have syntax error

 

"W_TAB_FIELD" must be a character-like data object (data type C, N, D, T, or STRING).

 

How can I split a string at tab character in the Unicode checks active environment?

 

Thanks in advance!

 

Fisher

Deep Structure field in Read --Key Condition

$
0
0

Hi Experts,

 

I am having a query related to usage of a Deep structure table field field in my where condition.

 

Requirement:

 

I have a deep structure as follows

 

Deep1.png

 

It have components as fieldname and domain values(which is a table type of DD07V table).

 

deep2.png

 

Now i have an internal(lT_values) table which have 2 fields like

 

FieldnameValue
ABC1
XYZA

 

 

Now I need to check whether this value exist in the DOMVALUE_L or in DOMVALUE_H.

 

For  that I looped the value table.

 

LOOP AT lt_values INTO ls_values.

READ TABLE lt_dom_val INTO ls_dom_val WITH KEY Fieldname = ls_details-fieldname  <xxx> = ls_values-values.

 

Am not able to access the DOMVALUE_L or DOMVALUE_H in the condition.

 

Kindly let me know how to reframe my Read table condition.

 

Regards,

Kannan

Promotions Config

$
0
0


Can anyone help wih the link to EHP7 Retail Promotions Config Guide?  Thx.


Restrict Leave request in Inactive status

$
0
0


Dear Experts.

 

Hope all doing good!!!

 

one of our client employee absconded from his serices and joined again.

 

Employee was able to applied for the leave during his absconding period after he re joined and got approval also.(But his status his inactive at that period).

 

Requirement is:-

 

If employee is applying for the leave during is inactive period .system should not allow him to apply for the leave.how can i achieve it??

 

Its urgent .please do the needful.

 

Regards

Sri

SAPUI5 custom app on fiori launch pad - "Could not start the app due to configuration problem" error

$
0
0

Hello Experts,

 

I have developed an custom app in webide using ui5, when I placed this custom app in Fiori Launchpad, i'm unable to open the app because the app is throwing an error  "Could not start the app due to configuration problem".

 

Capture 1.PNG

 

I have checked it in lpd_cust & semantic object also, they are well defined.

 

when I opened the console in Fiori launchpad it throws below error messagesCapture3.PNG

Capture 2.PNG

 

 

Capture4.PNG

 

 

So I would request all the experts to suggest me an solution.

 

Regard's,

Sri.

Unable to place an app in fiori launchpad

$
0
0

Hello Experts,

 

we have developed an customised application in webide using SAP UI5. when I'm trying to place this app on fiori launch pad the app is not opening instead it is throwing an error "App could not open due to configuration error".

 

we have lpd_cust and also semantic object is also defined correctly.

 

but when I look into console regarding the error it says an issue with additional information in component.js file, which i'm unable to understand.

 

So I request all os you t please suggest me an solution for this issue.

 

regard's,

Sri.

A brain friendly insight into Model, View, Controller (MVC) in the context of SAP UI5

$
0
0

Introduction : Multiple UI technologies follow the MVC design pattern including SAP WebDynpro Java, JSF etc and now SAP UI5. The blog describes the MVC design pattern. The content is compiled from multiple SAP sources but put in a single reorganised view to enhance understanding and highlight key information.

Target Audience : Consultants who wish to have a high level understanding to MVC towards SAP UI5 development.

Problem : multiple types of views (JS, JSON, XML, HTML) and new ways to expose services (OData, JSON, XML, Resource Models) make it a tough task to understand MVC in the perspective of SAPUI5. The SAP documentation is spread out across multiple sources.

Solution : This blog attempts to compile data from multiple sources and put it in a simple brain friendly, structured way so that information read persists in memory.

Outcome : At the end of the blog you will have a fair understanding of MVC in the context of SAP UI5.

Date Created : 2 Jan 2016

Note : This blog is a living document, I will keep on enhancing it with more, better structured and information and formatted code with every iteration. So next time you come back to the blog it will better than before.

Capture_MVC.PNG

 

Model

A model in the Model View Controller concept holds the data and provides methods to retrieve the data from the database and to set and update data. A model object is a container for the data upon which your application operates. The business data within a model can be defined using various formats:

  • JavaScript Object Notation (JSON)
  • Extensible Markup Language (XML)
  • Resource Model
  • OData

 

Server Side ModelsClient Side Models
  • OData Model
  • JSON model
  • XML model
  • Resource Model
  • Intended for big datasets.
  • JSON and XML Models are intended for small datasets.
  • The Resource model is designed to handle data in resource bundles, mainly to provide texts in different languages (small in size).
The dataset is only available on the server and the client only knows the currently visible rows and fields. Only loads the data requested by the user interface from the server.Model data is loaded completely and is available on the client.
This also means that sorting and filtering on the client is not possible. Any changes in data binding or list operations require a new request to the server. Operations such as sorting and filtering are executed on the client without further server requests
  • The OData model supports two-way (default), one-way and one-time binding modes. However, two-way binding is currently only supportes for properties, and not for aggregations.
  • The JSON model supports two-way (default), one-way and one-time binding modes.
  • The XML model supports two-way (default), one-way and one-time binding modes.
  • The Resource model only supports one-time binding mode because it deals with static texts only.
JSON Model is much compact in comparison with XML model.

 

You can not only define one model for your applications, but define different areas in your application with different models and assign single controls to a model. You can also define nested models, for example, a JSON model defined for the application and an OData model for a table control contained in the application.

A web application should support several data sources, such as JSON, XML, Atom, or OData. However, the way in which data binding is defined and implemented within the UI controls should be independent of the respective data source. It is also possible to create a custom model implementation for data sources that are not yet covered by the framework or are domain-specific.

 

View

The view in the Model View Controller concept is responsible for defining and rendering the UI. SAPUI5 supports predefined view types.

Capture.PNG
Although XML and JSON notation has been introduced for SAPUI5 UI controls, the Model View Controller concept is also supported to facilitate traditional programmatic UI constructions.

The following predefined view types are available:

Types of ViewsExamples
  • XML view. (Note: The XMLView type supports a mix of XML and plain HTML.)

<mvc:View controllerName="sap.hcm.Address" xmlns="sap.ui.commons" xmlns:mvc="sap.ui.core.mvc">

  <Panel>

    <Image src="http://www.sap.com/global/ui/images/global/sap-logo.png"/>

    <Button text="Press Me!"/>

  </Panel>

</mvc:View>

  • JSON view.

{

  "Type":"sap.ui.core.mvc.JSONView",

  "controllerName":"sap.hcm.Address",

  "content": [{

  "Type":"sap.ui.commons.Image",

  "id":"MyImage",

  "src":"http://www.sap.com/global/ui/images/global/sap-logo.png"

  },

  {

  "Type":"sap.ui.commons.Button",

  "id":"MyButton",

  "text":"Press Me"

  }]

}

  • JS view.

sap.ui.jsview("sap.hcm.Address", { // this View file is called Address.view.js

 

getControllerName: function() {

  return "sap.hcm.Address"; // the Controller lives in Address.controller.js

},

 

createContent: function(oController) {

var oButton = new sap.ui.commons.Button({text:"Hello JS View"});

oButton.attachPress(oController.handleButtonClicked);

  return oButton;

}

 

});

  • HTML view.

<template data-controller-name="example.mvc.test">

  Hello

  <h1>Title</h1>

  <div>Embedded HTML</div>

  <div class="test test2 test3" data-sap-ui-type="sap.ui.commons.Panel" id="myPanel">

  <div class="test test2 test3" data-sap-ui-type="sap.ui.commons.Button" id="Button1" data-text="Hello World" data-press="doIt"></div>

  <div data-sap-ui-type="sap.ui.commons.Button" id="Button2" data-text="Hello"></div>

  <div data-sap-ui-type="sap.ui.core.mvc.HTMLView" id="MyHTMLView" data-view-name="example.mvc.test2"></div>

  <div data-sap-ui-type="sap.ui.core.mvc.JSView" id="MyJSView" data-view-name="example.mvc.test2"></div>

  <div data-sap-ui-type="sap.ui.core.mvc.JSONView" id="MyJSONView" data-view-name="example.mvc.test2"></div>

  <div data-sap-ui-type="sap.ui.core.mvc.XMLView" id="MyXMLView" data-view-name="example.mvc.test2"></div>

  </div>

</template>


View types are offered for selection as view options in the application creation wizard. If you use SAPUI5application development tools, you can also plug in other view types. For defining other or custom view types, you extend the base class

sap.ui.core.mvc.View.

 

Controller

SAPUI5 uses the controller to separate the view logic from the model logic. The methods used for controlling the data flow are implemented in the controller.

 

You define a simple controller without functions as follows:

  sap.ui.controller("sap.hcm.Address", {

   // controller logic goes here

});

 

The string in quotes specifies the controller name. The controller file is then named Address.controller.js.

Note: The suffix .controller.js is mandatory for controllers.

 

Lifecycle Hooks

SAPUI5 provides predefined lifecycle hooks for implementation. You can add event handlers or other functions to the controller and the controller can fire events, for which other controllers or entities can register.

 

SAPUI5 provides the following lifecycle hooks:

Lifecycle HooksDescription
onInit()Called when a view is instantiated and its controls (if available) have already been created; used to modify the view before it is displayed to bind event handlers and do other one-time initialization
onExit()Called when the view is destroyed; used to free resources and finalize activities
onAfterRendering()Called when the view has been rendered and, therefore, its HTML is part of the document; used to do post-rendering manipulations of the HTML. SAPUI5 controls get this hook after being rendered.
onBeforeRendering()Invoked before the controller view is re-rendered and not before the first rendering; use onInit() for invoking the hook before the first rendering

 

 

Please NoteExample
For controllers without a view, no lifecycle hooks are called.

sap.ui.controller("sap.hcm.Address", {

   onInit: function() {

      this.counter = 0;

   }

});

Event Handlers and Other Functions

In addition to lifecycle hooks, a controller can define additional methods that serve as event handlers or additional functionality offered by the controller.

sap.ui.controller("sap.hcm.Address", {

  increaseCounter: function() {

          this.counter++;

   }

});

 

Controller Conventions
Controller names are capitalized

Controllers carry the same name as the related view (if there is a 1:1 relationship).

Event handlers are prefixed with "on"

e.g. onInit, onExit, onBeforeRendering, onAfterRendering

Controller names always end with *.controller.js

 

Miscellaneous

http://help.sap.com/saphelp_hanaplatform/helpdata/en/91/f233476f4d1014b6dd926db0e91070/content.htm?frameset=/en/91/f285256f4d1014b6dd926db0e91070/frameset.htm&current_toc=/en/d0/1cd0b7be7f441cb6c56ad4577b428c/plain.htm&node_id=190&show_children=false

Erro 699 - Sefaz PE

$
0
0

Bom dia pessoal,

 

Alguém mais está com problemas para emitir NF em PE?

Aqui emitimos devolução e transferência, todas rejeitaram com o erro 699.

"699 - Perc. ICMS Interestadual p/UF Destino difere do previsto p/ano Dt.Emiss."

 

São notas para contribuintes.

 

 

Att,

Belei

Fiori - Create Manual Payment...Could not Open App!

$
0
0

Hi Experts,

 

I am implementing some Fiori applications and have encountered a persistent issue with quite a lot of the apps.

 

The system I am working on has the config details: SAP Fiori for SAP Simple Finance, on-premise edition 1503

 

SAP_BASIS7400010SAPKB74010SAP Basis Component
SAP_GWFND7400011SAPK-74011INSAPGWFNDSAP Gateway Foundation 7.40
SAP_UI7400014SAPK-74014INSAPUIUser Interface Technology 7.40
EA-APPL6170008SAPK-61708INEAAPPLSAP Enterprise Extension PLM, SCM, Financials
EA-FINSERV6170008SAPK-61708INEAFINSRVSAP Enterprise Extension Financial Services
UIAPFI702000001SAPK-20001INUIAPFI70UI SFIN

 

I have gone back and checked the configuration of them all and everything seems to be in place and activated. But I still do not seem to be able to remove the error where it shuts down the app even before it loads and gives me an error message "Could not open app Try again later".

Fiori Error.JPG

For example for this discussion, I am trying to configure the application Create manual Payment.

 

For the configuration steps I am following the standard SAP document at the link

http://help.sap.com/saphelp_fiori_sfin_200/helpdata/en/BA/F3E0537C81190DE10000000A4450E5/content.htm

 

I have activated the UI app under SICF services: FIN_CREATE_SPAY and activated the OData service from /IWFND/MAINT_SERVICE : FAP_CREATE_SINGLE_PAYMENT (1)

 

and have also assigned the technical role SAP_SFIN_TCR_T and the business catalog role SAP_SFIN_BCR_PAYABLES_CLERK.

 

Any help in the area would be highly appreciated.

 

Thanks and Regards,

Abhishek Goel

MRP related issue

$
0
0

Dear team,

 

can anyone explain below.

 

my demand plan has been entered to system current month weekly basis and next three month monthly. after MRP run how do i read below table

 

 

my concern is why previous days are indicating above table and why calculated material requirement for whole requirement plan?

 

Tks.


OData service is not showing up

$
0
0

Hi,

 

I crated a new OData service in my HCP account using the Web Development Workbench.  I added this service as a new destination (named service) and the connection test was OK as shown in the screenshot below.  I tried to use it to create a new UI5 app but when I get to the add data connection step, only Northwind is available.  I can't see the new destination at all. Any help is appreciated!

 

Mark1.png

Error while running Legal Consolidation Package - An exception has been raised

$
0
0

Hi,

 

 

While running legal consolidation package, package is getting failed with an error - exception has been raised, screen shot of the error is attached.

Screenshot1.jpgScreenshot2.jpg

All business rules, methods and method based multipliers are valid. Package was successfully running before enabling HANA from the backend.

Thanks in advance

multiple line items in smartform using template

$
0
0

Dear Experts,

 

I have created a smartform, in which I have used only templates.

In multiple line item case it only takes last line item and prints.

I have also searched web where experts advice to use tables for multiple line items.

Still , is there any other way out that without changing my SF design same can be achieved.

 

I am attaching screen shot of output where part no, item and quantity changes in line item (plz see screen shot).

 

so please help me to solve this issue.

 

Regards,

 

Arpit R

SOME MATERIALS ARE NOT INCLUDED IN THE MRP JOB RUN

$
0
0

Hi,

 

In our plant X there are 100 materials (of MRP type p3 )for which MRP job run everyday. But recently what we have observed is some materials are not included for the MRP runs for some days because of no indicators(NETCH,NETPH) automatically updated for planning file entry in MD21 for some days this can be because of no demand changes, posting changes, routing changes  etc. for the material.

 

But  what I have observed is  materials are  included in MRP if I would do manual MRP RUN in MD02.

and materials also included if planning file entry is updated with anyone of the indicator in MD20

 

Actual requirement is;

Planned orders which were  created after planning time fence should not be firmed until the user firm manually. So if MRP run is not including these materials for some days the planned orders are coming within the planning time fence so then user have to do manual MRP run md02 to push the planned orders out of planning time fence.

 

As it is difficult to do manual MRP or creating planning file entries every day So how to include the materials in MRP job run for which planning file entry is not updated as there is no demand changes.

How i can create risk matrix ?

$
0
0

Hi

 

Is there any body can help me about risk matrix?

which transaction i can use for this?

 

regards

Mahtab

Viewing all 8150 articles
Browse latest View live


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