abap

Join list of strings with a comma

一个人想着一个人 提交于 2019-12-02 11:19:24
问题 I am learning ABAP. In the past I used python. Python: ', '.join(['one', 'two', 'three']) Result: 'one, two, three' How can I join a list of strings with , and create a string containing one, two, three ? System release is 740. 回答1: Another way of writing CONCATENATE LINES OF ... is to use the 7.40 function concat_lines_of( [table =] itab [sep = sep] ) cl_demo_output=>display( concat_lines_of( table = value string_table( ( `one` ) ( `two` ) ( `three` ) ) sep = `, ` ) ). (Result: 'one, two,

sap abap alv report fill gap between documents

时光毁灭记忆、已成空白 提交于 2019-12-02 08:33:46
I was trying to challenge myself to make an ALV report that displays all the data by company code. but some document number has a gap. I want to fill the gap between missing number For example: last index value: 20012 then next value is: 20014 How do I able to insert 20013 in the grid if the report is using all the data that exist in internal tables? Thanks. This is just blind text typing, but I hope you are able to understand it ... should be quite simple. Dont expect complete code, unless your are not even providing ANY code. DATA: lv_current type i, lv_next type i. SORT lt_internalTable by

Merging cells and cell formatting in ALV

二次信任 提交于 2019-12-02 07:01:03
We are trying to manipulate the alv grid class to get result like in Sap Agenda (SSC1 tcode) i.e. to merge columns and rows. We found that the class cl_calendar_control_schedule with the method display handles that and we are working to understand the content of this method and its parameters. We found that the internat table of lvc_t_data type handles horizontal and/or vertical merging of cells (one row of this Internal table for each cell), but I struggle to understand how to code cell styling, for example, if i want to wipe just the bottom border or left border. What is the style of

Get ABAP into SAP System

旧时模样 提交于 2019-12-02 06:40:17
问题 I'm salesforce.com developer and need to build a simple salesforce.com / SAP integration scenario for demo purposes. I have absolutely no experiences with SAP but we have at least a SAP demo system that I can currently access via SAP GUI only. Now a third party integration solution provider passed me some files and told me to transport them into my SAP demo system using transaction STMS. I think I understood that SAP's Transport Managment system is some kind of deployment tool to lift ABAP

Join list of strings with a comma

青春壹個敷衍的年華 提交于 2019-12-02 05:19:58
I am learning ABAP. In the past I used python. Python: ', '.join(['one', 'two', 'three']) Result: 'one, two, three' How can I join a list of strings with , and create a string containing one, two, three ? System release is 740. Another way of writing CONCATENATE LINES OF ... is to use the 7.40 function concat_lines_of( [table =] itab [sep = sep] ) cl_demo_output=>display( concat_lines_of( table = value string_table( ( `one` ) ( `two` ) ( `three` ) ) sep = `, ` ) ). (Result: 'one, two, three') I'm kind of spitballin' here but the following should work. You got a table of strings lt_strings and

List of BUKRS which the current user is allowed to see

耗尽温柔 提交于 2019-12-02 03:41:13
问题 Is there a way to get a list of all BUKRS which the current user is allowed to see? I want to use this list as a filter in open sql. Imagine the result of the method I search stored the result in bk_list . Then I could use bk_list like this: SELECT * FROM some_table WHERE bukrs IN bk_list 回答1: Another way to do it, based on the class CL_AUTH_OBJECTS_TO_SQL (>= 7.50), here the program reads the flights from the read-authorized airline carriers : DATA(authsql) = cl_auth_objects_to_sql=>create

What is WITH HEADER LINE used for in ABAP?

霸气de小男生 提交于 2019-12-01 23:52:37
问题 I have been studying this book and quoting from it: DATA: BEGIN OF CUSTOMER_TAB OCCURS 5, KUNNR TYPE KNA1-KUNNR, NAME1 TYPE KNA1-NAME1, END OF CUSTOMER_TAB. This declaration creates an internal table and a structure using the same name: CUSTOMER_TAB. And then in the following pages: Declaring Both an Internal Table and a Structure by Referring to a Structured Local/Global TYPE or Local/Global Structure DATA <internal table name> {TYPE|LIKE} <structure name> OCCURS <number> WITH HEADER LINE.

List of BUKRS which the current user is allowed to see

為{幸葍}努か 提交于 2019-12-01 23:09:06
Is there a way to get a list of all BUKRS which the current user is allowed to see? I want to use this list as a filter in open sql. Imagine the result of the method I search stored the result in bk_list . Then I could use bk_list like this: SELECT * FROM some_table WHERE bukrs IN bk_list Another way to do it, based on the class CL_AUTH_OBJECTS_TO_SQL (>= 7.50), here the program reads the flights from the read-authorized airline carriers : DATA(authsql) = cl_auth_objects_to_sql=>create_for_open_sql( ). authsql->add_authorization_object( EXPORTING iv_authorization_object = 'S_CARRID' it

In ABAP Workbench, how do I make the program return multiple table fields in a table when a button is clicked?

元气小坏坏 提交于 2019-12-01 22:22:00
I am new to SAP/ABAP Workbench and I am trying to create a program that allows a user to input a foodCode in order to receive the Item and Description after the press of a button. Is there a way the results can be put in a table on the same screen? How? report demo. tables food. SELECTION-SCREEN: SELECTION-SCREEN BEGIN OF BLOCK SEGMENTVALUE WITH FRAME TITLE A1TITLE. SELECTION SCREEN BEGIN OF LINE. PARAMETERS P_INPUT(10) TYPE C OBLIGATORY. SELECTION-SCREEN END OF LINE. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN PUSHBUTTON /2(40) B_RESULT USER-COMMAND BUT1. SELECTION-SCREEN END OF LINE.

Add/Change Column Name on Internal Table ALV

半腔热情 提交于 2019-12-01 21:34:01
问题 What I need is to add titles to these two columns (highlighted in yellow) and I don't know how to do that. FORM display_alv. DATA: gr_functions TYPE REF TO cl_salv_functions. DATA: gr_display TYPE REF TO cl_salv_display_settings. DATA: gr_columns TYPE REF TO cl_salv_columns_table. DATA: gr_column TYPE REF TO cl_salv_column_table. DATA: gr_sorts TYPE REF TO cl_salv_sorts. DATA: gr_agg TYPE REF TO cl_salv_aggregations. DATA: gr_selections TYPE REF TO cl_salv_selections. gr_functions = alv->get