Demo Program On Interactive ALV
Demo Program On Interactive ALV
*we select till 25 rows and on further refresh next 25 are selected
*we select transactions having screen numbers only
SELECT tcode
pgmna
dypno
FROM tstc
INTO CORRESPONDING FIELDS OF TABLE lt_tstc
UP TO 25 ROWS
WHERE tcode GT l_tstc
AND dypno NE '0000'.
* Code for transferring the values of local table to output table
* for 25 rows as sy-tfill is 25.
*In case there are no records a message pops up.
IF sy-subrc EQ 0.
DESCRIBE TABLE it_tstc.
READ TABLE lt_tstc INTO ls_tstc INDEX sy-tfill.
l_tstc = ls_tstc-tcode.
it_tstc[] = lt_tstc[].
ELSE.
MESSAGE 'No Records found ' TYPE 'i'.
ENDIF.
ENDFORM.
"read_data
*&---------------------------------------------------------------------*
*&
Form alv_output
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
FORM alv_output.
*subroutine to refresh alv
PERFORM event_exits.
*field catalogue
PERFORM build_fieldcat.
*Layout for alv
PERFORM build_layout.
*output display
PERFORM alv_display.
ENDFORM.
"alv_output
*&---------------------------------------------------------------------*
*&
Form event_exits
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*subroutine to refresh alv
FORM event_exits.
CLEAR wa_eventexit.
wa_eventexit-ucomm = '&REFRESH'.
" Refresh
wa_eventexit-after = 'X'.
APPEND wa_eventexit TO it_eventexit.
ENDFORM.
"event_exits
*&---------------------------------------------------------------------*
*&
Form build_fieldcat
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*Field catalogue
FORM build_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-row_pos
= '1'.
wa_fieldcat-col_pos
= '1'.
wa_fieldcat-fieldname = 'TCODE'.
wa_fieldcat-tabname
= 'it_tstc'.
wa_fieldcat-seltext_m = 'TRANSACTION'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-row_pos
= '1'.
wa_fieldcat-col_pos
= '2'.
wa_fieldcat-fieldname = 'PGMNA'.
wa_fieldcat-tabname
= 'it_tstc'.
wa_fieldcat-seltext_m = 'PROGRAM'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-row_pos
= '1'.
wa_fieldcat-col_pos
= '3'.
wa_fieldcat-fieldname = 'DYPNO'.
wa_fieldcat-tabname
= 'it_tstc'.
wa_fieldcat-seltext_m = 'SCREEN'.
APPEND wa_fieldcat TO it_fieldcat.
ENDFORM.
"build_fieldcat
*&---------------------------------------------------------------------*
*&
Form build_layout
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*Layout
FORM build_layout.
it_layout-zebra = 'X'.
it_layout-colwidth_optimize = 'X'.
ENDFORM.
"build_layout
*&---------------------------------------------------------------------*
*&
Form alv_display
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*ALV output
FORM alv_display.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program
= sy-repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'PFSTATUS'
it_fieldcat
= it_fieldcat
is_layout
= it_layout
it_event_exit
= it_eventexit
i_screen_start_column
= 10
i_screen_start_line
= 20
i_screen_end_column
= 70
i_screen_end_line
= 45
i_grid_title
= 'Call Tcode Refresh ALV'
TABLES
t_outtab
= it_tstc.
ENDFORM.
"alv_display
*&---------------------------------------------------------------------*
*&
Form user_command
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*User actions on ALV
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
*User clicks a transaction code and that tcode is called from ALV
WHEN '&IC1'.
READ TABLE it_tstc INDEX rs_selfield-tabindex INTO wa_tstc.
IF sy-subrc = 0.
CALL TRANSACTION wa_tstc-tcode.
ENDIF.
*user clicks the refresh button and the next 25 records are displayed
WHEN '&REFRESH'.
PERFORM fetch_data.
rs_selfield-refresh
= 'X'.
rs_selfield-col_stable = 'X' .
rs_selfield-row_stable = 'X' .
ENDCASE.
ENDFORM.
"user_command
*---------------------------------------------------------------------*
*
FORM PFSTATUS
*
*---------------------------------------------------------------------*
*Form for settings the pf status to the alv
FORM pfstatus USING ut_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD_FULLSCREEN' OF PROGRAM 'SAPLKKBL'.
ENDFORM.
" PF_STATUS_SET
Output
Click on this Refresh button, the next set of 25 records are displayed
Click on any transaction, and it takes you to that particular transaction.
*&---------------------------------------------------------------------*
*&
Form BUILD_VALUES
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form BUILD_VALUES .
SELECT MATNR ERSDA ERNAM
FROM MARA
INTO TABLE IT_MARA
WHERE MATNR IN S_MATNR.
endform.
" BUILD_VALUES
*&---------------------------------------------------------------------*
*&
Form BUILD_FCAT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form BUILD_FCAT .
WA_FCAT1-TABNAME = 'IT_MARA'.
WA_FCAT1-FIELDNAME = 'MATNR'.
WA_FCAT1-SELTEXT_M = 'MATERIAL NO'.
APPEND WA_FCAT1 TO IT_FCAT1.
CLEAR WA_FCAT1.
WA_FCAT1-TABNAME = 'IT_MARA'.
WA_FCAT1-FIELDNAME = 'ERSDA'.
WA_FCAT1-SELTEXT_M = 'CREATED ON'.
APPEND WA_FCAT1 TO IT_FCAT1.
CLEAR WA_FCAT1.
WA_FCAT1-TABNAME = 'IT_MARA'.
WA_FCAT1-FIELDNAME = 'ERNAM'.
WA_FCAT1-SELTEXT_M = 'CREATED BY'.
APPEND WA_FCAT1 TO IT_FCAT1.
CLEAR WA_FCAT1.
endform.
" BUILD_FCAT
*&---------------------------------------------------------------------*
*&
Form TOP_OF_PAGE
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form TOP_OF_PAGE .
DATA: WA_LISTHEADER TYPE SLIS_LISTHEADER.
*//HEADER TEXT
WA_LISTHEADER-INFO = 'ALV REPORT FOR MATERIALS'.
WA_LISTHEADER-TYP = 'H'.
APPEND WA_LISTHEADER TO IT_LISTHEADER1.
CLEAR WA_LISTHEADER.
*//SUB-ITEMS
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'DATE: '.
WA_LISTHEADER-INFO = SY-DATUM.
APPEND WA_LISTHEADER TO IT_LISTHEADER1.
CLEAR WA_LISTHEADER.
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'TIME: '.
WA_LISTHEADER-INFO = SY-UZEIT.
APPEND WA_LISTHEADER TO IT_LISTHEADER1.
CLEAR WA_LISTHEADER.
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'EXECUTED BY: '.
WA_LISTHEADER-INFO = SY-UNAME.
APPEND WA_LISTHEADER TO IT_LISTHEADER1.
CLEAR WA_LISTHEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary
= IT_LISTHEADER1
I_LOGO
= 'VENKAT_LOGO'
*
I_END_OF_LIST_GRID
=
*
I_ALV_FORM
=
.
REFRESH IT_LISTHEADER1.
endform.
" TOP_OF_PAGE
*&---------------------------------------------------------------------*
*&
Form DISPLAY_FCAT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form DISPLAY_FCAT .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program
= v_repid
i_callback_user_command
= 'USER_COMMAND'
i_callback_top_of_page
= 'TOP_OF_PAGE'
I_GRID_TITLE
= I_TITLE_MARA
is_layout
= v_layout
it_fieldcat
= it_fcat1
*
IS_VARIANT
= VARIANT
*
I_SAVE
= 'U'
IT_EVENTS
= IT_EVENTS
TABLES
t_outtab
= IT_MARA
EXCEPTIONS
PROGRAM_ERROR
=1
OTHERS
=2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
" DISPLAY_FCAT
*&---------------------------------------------------------------------*
*&
Form GET_EVENTS
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form GET_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE
=0
IMPORTING
ET_EVENTS
= IT_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG
=1
OTHERS
=2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
" GET_EVENTS
*&---------------------------------------------------------------------*
*&
Form POPULATE_EVENTS
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form POPULATE_EVENTS .
READ TABLE IT_EVENTS INTO WA_EVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'TOP_OF_PAGE'.
MODIFY IT_EVENTS FROM WA_EVENTS
TRANSPORTING FORM WHERE NAME = WA_EVENTS-NAME.
CLEAR WA_EVENTS.
ENDIF.
READ TABLE IT_EVENTS INTO WA_EVENTS WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'USER_COMMAND'.
MODIFY IT_EVENTS FROM WA_EVENTS
TRANSPORTING FORM WHERE NAME = WA_EVENTS-NAME.
CLEAR WA_EVENTS.
ENDIF.
endform.
" POPULATE_EVENTS
*&---------------------------------------------------------------------*
*&
Form USER_COMMAND
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
*
-->P_R_UCOMM text
*
-->P_TYPE text
*
-->P_SY_UCOMM text
*
-->P_RS_SELFIELD text
*
-->P_TYPE text
*
-->P_SLIS_SELFIELD text
*----------------------------------------------------------------------*
form USER_COMMAND using R_UCOMM RS_SELFIELD TYPE SLIS_SELFIELD .
CASE R_UCOMM.
WHEN '&IC1'.
IF RS_selfield-FIELDNAME = 'MATNR'.
READ TABLE IT_MARA INTO WA_MARA INDEX RS_selfield-tabindex.
MOVE RS_SELFIELD-VALUE TO MATNR_VAL.
ENDIF.
PERFORM BUILD_VALUES_MARC.
PERFORM BUILD_FCAT_MARC.
PERFORM TOP_OF_PAGE_MARC.
PERFORM GET_EVENTS_MARC.
PERFORM POPULATE_EVENTS_MARC.
PERFORM DISPLAY_FCAT_MARC.
ENDCASE.
REFRESH IT_FCAT2.
endform.
" USER_COMMAND
*&---------------------------------------------------------------------*
*&
Form BUILD_FCAT_MARC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form BUILD_FCAT_MARC .
WA_FCAT1-TABNAME = 'IT_MARC'.
WA_FCAT1-FIELDNAME = 'MATNR'.
WA_FCAT1-SELTEXT_M = 'MATERIAL NUMBER'.
APPEND WA_FCAT1 TO IT_FCAT2.
CLEAR WA_FCAT1.
WA_FCAT1-TABNAME = 'IT_MARC'.
WA_FCAT1-FIELDNAME = 'WERKS'.
WA_FCAT1-SELTEXT_M = 'PLANT'.
APPEND WA_FCAT1 TO IT_FCAT2.
CLEAR WA_FCAT1.
WA_FCAT1-TABNAME = 'IT_MARC'.
WA_FCAT1-FIELDNAME = 'PSTAT'.
WA_FCAT1-SELTEXT_M = 'STATUS'.
APPEND WA_FCAT1 TO IT_FCAT2.
CLEAR WA_FCAT1.
endform.
" BUILD_FCAT_MARC
*&---------------------------------------------------------------------*
*&
Form BUILD_VALUES_MARC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form BUILD_VALUES_MARC .
REFRESH IT_MARC.
SELECT SINGLE MATNR WERKS PSTAT
FROM MARC
INTO WA_MARC
WHERE MATNR = MATNR_VAL.
APPEND WA_MARC TO IT_MARC.
CLEAR WA_MARC.
endform.
" BUILD_VALUES_MARC
*&---------------------------------------------------------------------*
*&
Form TOP_OF_PAGE_MARC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form TOP_OF_PAGE_MARC .
DATA: WA_LISTHEADER1 TYPE SLIS_LISTHEADER.
REFRESH IT_LISTHEADER1.
WA_LISTHEADER1-INFO = 'ALV REPORT FOR PLANTS'.
WA_LISTHEADER1-TYP = 'H'.
APPEND WA_LISTHEADER1 TO IT_LISTHEADER2.
CLEAR WA_LISTHEADER1.
WA_LISTHEADER1-TYP = 'S'.
WA_LISTHEADER1-KEY = 'DATE: '.
WA_LISTHEADER1-INFO = SY-DATUM.
APPEND WA_LISTHEADER1 TO IT_LISTHEADER2.
CLEAR WA_LISTHEADER1.
WA_LISTHEADER1-TYP = 'S'.
WA_LISTHEADER1-KEY = 'TIME: '.
WA_LISTHEADER1-INFO = SY-UZEIT.
APPEND WA_LISTHEADER1 TO IT_LISTHEADER2.
CLEAR WA_LISTHEADER1.
WA_LISTHEADER1-TYP = 'S'.
WA_LISTHEADER1-KEY = 'EXECUTED BY: '.
WA_LISTHEADER1-INFO = SY-UNAME.
APPEND WA_LISTHEADER1 TO IT_LISTHEADER2.
CLEAR WA_LISTHEADER1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary
= IT_LISTHEADER2
I_LOGO
= 'VENKAT_LOGO'
*
I_END_OF_LIST_GRID
=
*
I_ALV_FORM
=
.
REFRESH IT_LISTHEADER2.
endform.
" TOP_OF_PAGE_MARC
*&---------------------------------------------------------------------*
*&
Form GET_EVENTS_MARC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form GET_EVENTS_MARC .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE
=0
IMPORTING
ET_EVENTS
= IT_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG
=1
OTHERS
=2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
" GET_EVENTS_MARC
*&---------------------------------------------------------------------*
*&
Form POPULATE_EVENTS_MARC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form POPULATE_EVENTS_MARC .
READ TABLE IT_EVENTS INTO WA_EVENTS WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENTS-FORM = 'TOP_OF_PAGE_MARC'.
MODIFY IT_EVENTS FROM WA_EVENTS
TRANSPORTING FORM WHERE NAME = WA_EVENTS-NAME.
CLEAR WA_EVENTS.
ENDIF.
endform.
" POPULATE_EVENTS_MARC
*&---------------------------------------------------------------------*
*&
Form DISPLAY_FCAT_MARC
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
* --> p1
text
* <-- p2
text
*----------------------------------------------------------------------*
form DISPLAY_FCAT_MARC .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program
= v_repid
i_callback_top_of_page
= 'TOP_OF_PAGE_MARC'
I_GRID_TITLE
= I_TITLE_MARC
is_layout
= v_layout
it_fieldcat
= it_fcat2
TABLES
t_outtab
= IT_MARC
EXCEPTIONS
PROGRAM_ERROR
=1
OTHERS
=2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform.
" DISPLAY_FCAT_MARC
-----------------------------------------------------------------------------------------------------------NOTE: If you have any queries, leave comments so that i acn get back to
you.
Thanks.
In this scenario, we would take an example of a material and develop an interactive report. Once
you click on require material no on the basic list, the corresponding material information on the
secondary list.
Following is a sample interactive report developed for our demo purpose:
REPORT zintractive
Double Click on require Material No which displays secondary list to corresponding material
information.
The result shown below
Hi,
1.Double_click is used for Interactive reports.
Eg: FORM_USER_COMMAND USING UCOMM TYPE SY-UCOMM
SELFIELD TYPE SLIS_SELFIELD.
In this stmt UCOM stores FCT code where u Double click on field.
2.EDIT - It is used to Edit the Perticular field in The grid.
3. Hotspot = 'x' means it will show Hand Symbol when u put cursor on that Field.
By: Sateesh | 15 Mar 2012
1. DOUBLE_CLICK it is an Event.it is used for to print Interactive Report.
this is mainly used in ooalv report.
ex:Dc event for double_click for e_row. (e_row is parameter)
2. EDIT field is used to edit data at output screen
this is declare in Feildcat Level only.
ex : EDIT = 'X'.
3.Hotspot is used for Single click at Basic list.
it shows Hand symbol ,it is also Declared in Fieldcat leavel
Hotspot = 'X'.
By: nagarajut | 23 May 2012
At selection-screen on
select stmt-------------------- where =
if sy-subrc <> 0.
validation failure on high value in the selection field.
else
success.
endif
put
get late
What are Difference Between Classical Batch Input and Call
Transaction?
Answer1:
In Batch input many transactions can be executed, where as in
Call transcation only one transactioin can be executed.
BI is a background process, Ct can be either background or
foreground .
BI is Synchronous process, Ct is both Asynchronous & Synchronous.
BI Sessions cannot be runed parallel.
Log file is generated automaticly in BI, errors can be found
through BDCMSGCOLL.
Answer2:
1.batch input works for multiple applications where as call
transactions doen't work
2.batch input has an implicit log file with it. where as call
transaction doesn't have
3.batch input has sy-subrc check with the database where as call
transaction doesn't have so call transaction is fast.
Perfrom Dispaly.
endcase.
THIS IS HOW WE DO INTERACTIVE ALV...
I THINK THIS WIIL U IN DOING CLASSICAL AND INTERACTIVE
ALV..
Classical Report : It is nothing but getting data from one or more tables and displays
it on LPS formated or unformated. It is having only one screens for the output. It has
not any sub list.
Events like that.
Initilizations
At selection-screen
Start-of-selections
Top-of-page
End-of-page
End-of-selections
Interactive Report : Is nothing but communications between one report data to
another. its having one primary list and 20 secondary list for the outputs.
Events like that
At line selections
At user-command
At pt
Top-of-page-during line-selections.
ALV Report : Its stands for Application line viewer, it is used for analysis purpose, it
has no limitations characters for the printing. These are two types list and grid.
hi bhushan,
1. What is the difference b/w classical report and ALV report and in classical report can we
produce output more than 255 characters?
Ans. Classical report ---Consist of one program that create a single list.This means that when list
is displayed,it has to contain all data
requested,regardless of the number of details the user wants to see.This procdeure may result in
extensive and cluttered list from which the user has to pick the relvent data.(desired selection
much be made before hand).
Mian thing in classical report is it is not interactive(you will have cluttered information).
Alv report _ IS interactive reporting (it is a set of function modules).(in alv we use both classical
and interactive).
in classical report we can't produce output more than 255 characters(but in ALV we can have the
report contains columns more than 255 characters in length).
ALV is very efficient tool for dynamically sorting and arranging the columns from a report
output.
2. Did you used classes to create ALV reports and how is superior over using function modules in
ALV report generation?
Ans. its upto you(did you use classes in ALV then say yes)
3. If we don't know the exact number of blocks to be generated then Can we generate the output
with different number of blocks in
ALV reports?
4. In report if we have write statements in initialization, top of page and in start of selection then
which event is first excuted and what
is the output?
ANS. TOP_OF_PAGE is triggered.
this event is triggered with the first WRITE statement or whenever new page is triggered. if you
donts have any write statement before top-of-page or
in start-of-selection then this event is not triggered.
READ_BY_LINE = 'X'
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = itab[]
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF sy-subrc <> 0.
ENDIF.
/people/william.li/blog/2006/03/21/minimize-memory-usage-during-message-mapping-whenreplicating-an-element
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f59730fa-0901-0010df97-c12f071f7d3b
/people/claus.wallacher/blog/2006/04/17/replication-of-nodes-using-the-graphical-mapping-tool
/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-theirimplementation-in-integration-processes-bpm-in-xi
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
Reply
http://www.sap-basis-abap.com/abap/handling-table-control-in-bdc.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
When you have enter multiple line in BDC for a table control use call transaction tcode using
i_bdcdata options from opt message into i_messages.
SEPARATED BY '.'.
PERFORM bdc_field USING lws_field lws_date.
CONCATENATE 'FPLT-FPROZ(' lws_cnt ')' INTO lws_field.
lws_perct = wa_invoicing_plan-percentage.
CONDENSE lws_perct.
PERFORM bdc_field USING lws_field lws_perct.
ENDLOOP.
LOOP AT i_messages.
ENDLOOP.
10. why can't we use call transaction method to upload large amount of data?
Ans.there are chances of many errors.
11.what is the use of standard text in sap scripts, why can't we hard code the same information in
form itself?
Ans.Assume ur company has stored some text which will printed on sapscript based on certain
conditions and not taken thru driver program .
Then you will create a standard text thru SO10 create a text name and id would be ST and
language as EN .
AND YOU PLace the text You have to print 'Plant is 1000 and stock is 1000'.
and this will create one standard text and another standard text for another .
USER EXITS
1. Introduction:
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_tra
nsaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
Just for an example if you face any error in your system. Then there is error number associated
with the error. Then you can search for the OSS not for the error number, and the note will give
you possible solution to your problem.
You do have notes for any details for every thng and any thing related to SAP.
Search in http://service.sap.com support portal link with keywork 'OSS' / 'OSS User Guide' to get
more info and 'how to' guides.
OSS (online support system) .You can get this support from WWW.SAP.COM site..SAP will
issue OSS userid and password to the customers with each licence to their packages..Here you
will get all suppost packages information and how to use the things..These kind of info you will
get it..Ask your Project customer about this id.. OSS1 is the transaction code to check the oss
notes from SAP...
17. what are the classes that are used in ALV reporting?
ans.Check out this tutorial
BCALV_GRID_*.
Check these out:
Check this for basic concepts of OOPS
ABAP Interactive Reports, here we are providing real time SAP
Interactive Reports interview questions and answers. These
questions are helpful in facing the interviews. These interactive
reporting questions are collected from various sources, refer this
post for more details and interview questions on Interactive
Reporting. Click on read more to read this article.
Event
Moment at which the user selects a line by double clicking on it or by positioning the cursor on it
and pressing F2.
ING
To create a new status, the Development Workbench offers the Menu Painter. With the Menu
Painter, you can create menus and application tool bars. And you can assign Function Keys to
certain functions. At the beginning of the statement block of AT END-OF-SELECTION, active
the status of the basic list using the statement: SET PF-STATUS STATUS.
7. What is interactive reporting?
A classical non-interactive report consists of one program that creates a single list. Instead of
one extensive and detailed list, with interactive reporting you create basic list from which the
user can call detailed information by positioning the cursor and entering commands. Interactive
reporting thus reduces information retrieval to the data actually required.
8. Can we call reports and transactions from interactive reporting lists?
Yes. It also allows you to call transactions or other reports from lists. These programs then use
values displayed in the list as input values.
The user can, for example, call a transaction from within a list of change the database table
whose data is displayed in the list.
Index of the list created during the current event (basic list = 0)
SY-LIST1
Index of the list level from which the event was triggered.
SY-LILL1
Absolute number of the line from which the event was triggered.
SY-LISEL
-CUROW
Position of the line in the window from which the event was triggered (counting starts with 1)
-CUCOL
Position of the column in the window from which the event was triggered
with 2).
-CPAGE
Page number of the first displayed page of the list from which the event was triggered.
-STARO
Number of the first line of the first page displayed of the list from which the event was triggered
(counting starts with 1). Possibly, a page header occupies this line.
-STACO
Number of the first column displayed in the list from which the event was triggered (counting
starts with 1).
(counting starts
SY-UCOMM
SY-PFKEY
You can assign different message types to each message you output. The influence of a message
on the program flow depends on the message type. In our program, use the MESSAGE
statement to output messages statically or dynamically and to determine the message type.
Syntax:REPORT <rep> MESSAGE-ID <id>.
15. What are the drill-down features provided by ABAP/4 in interactive lists?
ABAP/4 provides some interactive events on lists such as AT LINE-SELECTION (double click)
or AT USER-COMMAND (pressing a button).
You can use these events to move through layers of information about individual items in a list.
17. Is the basic list deleted when the new list is created?
No. It is not deleted and you can return back to it using one of the standard navigation functions
like clicking on the back button or the cancel button.
20. Can we create a gui status in a program from the object browser?
Yes. You can create a GUI STATUS in a program using SET PF-STATUS.
21. In which system field does the name of current gui status is there?
The name of the current GUI STATUS is available in the system field SY-PFKEY.
22. Can we display a list in a pop-up screen other than full-size stacked list?
Yes, we can display a list in a pop-up screen using the command WINDOW with the additions
starting at X1 Y1 and ending at X2 Y2 to set the upper-left and the lower-right corners where x1
y1 and x2 y2 are the coordinates.
25. How can you display frames (horizontal and vertical lines) in lists?
You can display tabular lists with horizontal and vertical lines (FRAMES) using the ULINE
command and the system field SY-VLINE.
The corners arising at the intersection of horizontal and vertical lines are automatically drawn by
the system.
26. What are the events used for page headers and footers?
The events TOP-OF-PAGE and END-OF-PAGE are used for pager headers and footers.
27. How can you access the function code from menu painter?
From within the program, you can use the SY-UCOMM system field to access the function
code. You can define individual interfaces for your report and assign them in the report to any
list level.
If you do not specify self-defined interfaces in the report but use at least one of the three
interactive event keywords. AT LINE-SELECTION, AT PF<nn>, OR AT USER-COMMAND in
the program, the system automatically uses appropriate predefined standard interfaces. These
standard interfaces provide the same functions as the standard list described under the standard
list.
30. How can you manipulate the presentation and attributes of interactive lists?
---Scrolling through Interactive Lists.
---Setting the Cursor from within the Program.
---Modifying List Lines.
Transaction
SUBMIT AND RETURN
CALL TRANSACTION
LEAVE TO TRANSACTION