Found 1044 Articles for SAP

Apply sorting on Date in SAP BO Webi report

Srinivas Gorla
Updated on 30-Jul-2019 22:30:20

500 Views

As you had already mentioned that you are using FormatDate function to format the date, So the sorting is applied to the output of the function which is STRING. So it applies sorting on the string and sorts only the initial alphabets which are a day in your case.You can get your task done in few ways:Easiest option will add another column with the same field and then apply sorting on this and then hide the column. This will sort your data on the date field.Other but better option will be using a custom date format to format the date ... Read More

Controlling close events in SAP Business One Screen Painter

Amit Sharma
Updated on 30-Jul-2019 22:30:20

190 Views

You can make use of SP_TransactionNotification, which is one of the most common way of receiving notification of data-driven events. With the use of SP_TransactionNotification, you can edit error code returned by Transaction notification, and also prevent transaction to committed.This shows how to prevent a purchase order from adding when the base document is not provided. You can make use of SBO_SP_TransactionNotification for Screen Painter forms in SBO to avoid null values.

Where is VKORG stored in SAP

Abhinanda Shri
Updated on 30-Jul-2019 22:30:20

1K+ Views

Since VKORG is related to sales, it is stored in VBAK which is header table for all the sales order. It is a mandatory field on the table so it is mapped with order and stored with the order itself.You can get the description in the TVKOT table for more details on the sales order.

Getting a carriage return of report field in SAP Crystal Report

Amit Sharma
Updated on 14-Feb-2020 10:17:37

235 Views

You can make use of split as below −// To split the text on carriageLocal Stringvar Array lines: = Split( {table.field}, Chr(20) );// To return carriage 1 less than the number of linesLocal Numbervar delimiters := Ubound(lines)-1;Let us see one more example, how to use split to divide a string in different lines.stringvar array x := split({table.fullname}," "); x[1] stringvar array x := split({table.fullname}," "); if ubound(x) >= 2 then x[2] stringvar array x := split({table.fullname}," "); if ubound(x) >= 3 then x[3]This will split a string in 3 different lines like“Mr”“John”“Harper”

Passing parameter with parenthesis via URL in SAP Open document

Rahul Sharma
Updated on 30-Jul-2019 22:30:20

167 Views

You can enclose the parenthesis in Quotes “” and try. URL will look like below:http:///OpenDocument/opendoc/openDocument.aspx?sViewer=html&sDocName=&sType=rpt&promptex-=URI_ESCAPE("VALUE_CONTAINING_(PARENTHESIS)")

Skipping mandatory fields in an ABAP screen

Ali
Ali
Updated on 30-Jul-2019 22:30:20

737 Views

You can make use of function code which is assigned to push button with “Exit” as function type and an event “AT SELECTION-SCREEN ON EXIT-COMMAND” to achieve this.A call is made to this event to validate the fields on the screen and you can implement all logic here.

Using SAP OLE code to take an internal table and paste it into an excel file

Ali
Ali
Updated on 11-Dec-2019 07:03:46

513 Views

Note that you have to use “double quotation” for all the text you have to put into one cell and then connect cell with 0X09 and 0X0A for next column and next row respectively.Check the below code as it fills two cells with 2 lines:CONSTANTS:    nextC TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab,    nextR TYPE abap_char1 VALUE cl_abap_char_utilities=>newline,    quot TYPE abap_char1 VALUE '"'. DATA:    buffer TYPE string. CONCATENATE quot 'R1C1L1' nextR 'R1C1L2' quot nextC quot 'R1C2L1' nextR 'R1C2L2' quot INTO buffer.Read More

Using VBA macro to call an ABAP code

Amit Sharma
Updated on 14-Feb-2020 11:18:55

449 Views

Please try using below script −Dim sapConn As Object \Declaring a connection object Set sapConn = CreateObject("SAP.Functions") \Creating an ActiveX object sapConn.Connection.user = "username" sapConn.Connection.Password = "xxxx" sapConn.Connection.client = "client#" sapConn.Connection.ApplicationServer = "Application Server” sapConn.Connection.Language = "PT" If sapConn.Connection.Logon(0, True) True Then //Checking connection here    MsgBox "Not able to login to SAP" Else    MsgBox "Login Successful !!" End If Dim rfcAcctDocCheck As Object Dim oAcctHeader As Object Dim otAcctAR, otAcctGL, otAcctAP, otAcctAMT, otReturn As Object Set rfcAcctDocCheck = sapConn.Add("BAPI_ACC_DOCUMENT_CHECK") Set oAcctHeader = rfcAcctDocCheck.Exports("DOCUMENTHEADER") Set otAcctGL = rfcAcctDocCheck.Tables("ACCOUNTGL") Set otAcctAR = rfcAcctDocCheck.Tables("ACCOUNTRECEIVABLE") Set otAcctAP = ... Read More

Exposing xsjs file data through web browser in SAP HANA

Rahul Sharma
Updated on 11-Dec-2019 06:40:38

253 Views

Note that you have to ensure that Port number 80+ should be open on network. Also URL you are using should be properly built. Below is correct path:server:port/repository_path/file_nameIn your case, you should be using:host: hanacloud port: 8000 (80 + instance_number) SAP HANA Repository tree: mdo ->    sap ->       sflight ->          test ->             test.xsjsSo your URL should be in this format:hanacloud:8000/mdo/sap/sflight/test/test.xsjs

How to have a structure with a table in ABAP?

Ramu Prasad
Updated on 10-Dec-2019 10:22:03

1K+ Views

The basic rule while specifying a table within a structure is that you have to give a non-unique constraint to that field.TYPES: myType TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEYThen use this in the structure definition:TYPES: BEGIN OF ty_itab, ….. myTable type myType, …….. TYPES: END OF ty_itab.

Advertisements