SAP Articles

Page 37 of 91

Accessing table data from SAP system

SAP
Amit Sharma
Amit Sharma
Updated on 14-Feb-2020 659 Views

Using Select statement you can read data with a dynamic table name. Try using below code &areDATA: lv_tablename TYPE string,    ev_filelength TYPE i. lv_tablename = 'mara'. "e.g. a parameter DATA dref TYPE REF TO data. CREATE DATA dref TYPE TABLE OF (lv_tablename). FIELD-SYMBOLS: TYPE ANY TABLE. ASSIGN dref->* to . SELECT * FROM (lv_tablename) INTO TABLE .

Read More

Using VBA macro to call an ABAP code

Amit Sharma
Amit Sharma
Updated on 14-Feb-2020 727 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

Equivalent for Row_Number() in SAP ABAP

Ali
Ali
Updated on 14-Feb-2020 975 Views

When you want to modify the contents and store them into table and also to add a column for the value, use something likeDATA: my_string TYPE StringLOOP AT itab INTO wa_itab. my_string = sy-tabix. CONCATENATE some_text my_string more_text into wa_itab-my_field. MODIFY itab FROM wa_itab. CLEAR my_string. ENDLOOP.

Read More

Open a Workbook require loading SAPBEX.xla file

Amit Sharma
Amit Sharma
Updated on 14-Feb-2020 206 Views

Copy the below code in PERSONAL.XLSM module of your workbook and then refresh −Private WithEvents App As Application Private Sub Workbook_Open()    Set App = Application End Sub Try adding below code, in your module: Private Sub App_WorkbookOpen(ByVal Wb As Workbook)    MsgBox "New Workbook: " & Wb.Name End Sub

Read More

Binding model to sap.ui.core in SAP UI5 application

Johar Ali
Johar Ali
Updated on 14-Feb-2020 304 Views

Please try below where you need to prefix propertyBinding with models name −var oItemTemplate = new sap.m.ActionListItem({    title : "{checks>title}",    ... });

Read More

Using sy-datum low and high in ABAP Program

Rahul Sharma
Rahul Sharma
Updated on 14-Feb-2020 3K+ Views

In this code, you have used ‘BT’ i.e. between so select option will hit any date between today and YYYYMMDD ‘99991231’.You should declare high dates at INITIALIZATION so that it is visible on the selection screen and you can change it if required.select-OPTIONS: so_date FOR sy-datum. INITIALIZATION.    so_date-sign = 'I'.    so_date-option = 'BT'.    so_date-low = sy-datum.    so_date-high = '99991231'. APPEND so_date.

Read More

Parsing SAP Logon ticket with .NET

Johar Ali
Johar Ali
Updated on 14-Feb-2020 304 Views

SAP provides SAP SSO EXT Lib for parsing SAP Logon ticket. SAP SSO EXT library supports SAP logon tickets as a part of the java based application.You can download SAP SSO EXT library from SAP service marketplace http://service.sap.com/swdc and then search here for SAPSSOEXT.

Read More

In SAP UI5 render calling two times in custom control

Rahul Sharma
Rahul Sharma
Updated on 14-Feb-2020 431 Views

In your custom control, there are two aggregation updates- setAggregation and addContent. When you use Aggregation mutators, it uses 3rd parameter to suppress invalidation.It will insert the aggregation but suppress the invalidation since whole control will be rendered at the end it.oControl.setAggregation("layout", oSavedButtonHLyt, true); // suppress invalidateYou should think that It should work same for “addContent”.oSavedButtonHLyt.addAggregation("content", manageSavedSearch[index], true);However, it doesn’t work as UI5 cannot determine automatically for the previous parent's suppress cos its aggregation will be moved. You have to note that property, aggregation or an association invalidates control when control does not overwrite its mutator method.

Read More

Converting OData using SAPUI5 libraries to JSON format

Ali
Ali
Updated on 14-Feb-2020 605 Views

This can be done in multiple ways. One of common approach would be by passing user name/password in URL.$.ajax({    url : "http://user:password@url/SERVICE?$format=json",    type: "GET", //or POST?    dataType: "jsonp",    success: function(){alert("ok")},    error: function(){alert("error")} })

Read More

Getting a carriage return of report field in SAP Crystal Report

Amit Sharma
Amit Sharma
Updated on 14-Feb-2020 382 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”

Read More
Showing 361–370 of 902 articles
« Prev 1 35 36 37 38 39 91 Next »
Advertisements