Archiv der Kategorie: SAP für Einsteiger und Anwender

SALV Table – Display table data in a popup window

This is an easy way to fetch data and show it in a table popup using the class cl_salv_table. Enjoy.


DATA: lr_alv TYPE REF TO cl_salv_table.
DATA: lr_functions TYPE REF TO cl_salv_functions_list.
DATA: lt_t100a TYPE STANDARD TABLE OF t100a.

* fetch data
clear lt_t100a.
SELECT * FROM t100a INTO TABLE lt_t100a uP TO 20 ROWS.


cl_salv_table=>factory(
IMPORTING
r_salv_table = lr_alv
CHANGING
t_table = lt_t100a ).

*set funtion toolbar
lr_functions = lr_alv->get_functions( ).
lr_functions->set_default( 'X' ).

* Set pop-up-dimensions
lr_alv->set_screen_popup(
start_column = 75
end_column = 150
start_line = 2
end_line = 9 ).


*Calling the display-method
lr_alv->display( ).

Enjoy the snippet.

Transporting SAP Smartforms – Upload and download via XML

Sometimes you need to transport your smartforms between different SAP Systems. It’s quite easy with SAP-standard upload and download funtion.

HOW TO DOWNLOAD YOUR SMARTFORM:

Step 1: Start with SMARTFORM Transaction.
Utilities/Hilfsmittel -> Download Form/Formular runterladen

Step2: Enter the original Smartform you want to download (Original Formname)

Step3: Saveit on your local client – choose a folder and save the form in XML format

Step4: Once the smart form is downloaded. Success message is displayed as shown below

HOW TO UPLOAD YOUR SMARTFORM:

Step 1: Start with SMARTFORM Transaction.
Go to Utilities/Hilfsmittel -> Upload Form/Formular hochladen

Step2: Give the Form name(Z_MY_NEW_FORMNAME)

Step3: Select the form from the destination folder which has been downloaded and that has to be uploaded

Step4: Once the SMARTFORM is uploaded and form is saved, the SMARTFORM is ready to use and make necessary changes and activate.

SAP ALV Grid – Zellen einfärben – Farbcodes

Einfärben einer bestimmten Zelle im ALV Grid…eine kleine Step-by-Step Anleitung

  1. Erweitere deine Ausgabetabelle um eine Komponente (Feld) mit Typ LVC_T_SCOL
  2. Trage den Namen dieser Komponente Namen (z.B. COL_TAB) in der Spalte CTAB_FNAME der Layoutstruktur ein. Bsp: