Report or Function module (FM) to activate multiple Views
Hello All,
I have around 9000 Views to be activated in the system.
Is there any way where I can activate them in one go without having to go to SE14/SE11 one by one to do so???
Thanks in advance...
BR,
Lucky
Hello
Try to do this with FM DD_MASS_ACT
Also look at report RADMASG0
Similar Messages
-
Calling a report from function module
Hi Friends,
I have requirement for Function Module i.e. we will add the button to the standard T-code and ( Function added in config ) then
Function to be called from Customizing
Program A called from customizing function
CalculationPDFFunction is called from program A.
So can any one help me the logic for "calling a report from function module ".
Thanks in Advance.
Regards,
OSReddy.
Edited by: OSReddy on Sep 23, 2011 7:31 AMHi Jaya,
Yes. It is possible to call ur custom program using SUBMIT statement.
1. If u have data to pass then build table type RSPARAMS and use below statement.
data:
rspar_tab TYPE TABLE OF rsparams,
rspar_line LIKE LINE OF rspar_tab,
SUBMIT report1 WITH SELECTION-TABLE rspar_tab
AND RETURN.
1. If u want to create variant to the program and use that. use the below statement .
SUBMIT report1 USING SELECTION-SET 'VAR1' "variant
AND RETURN.
Regards,
Venkat.O -
How to find out the Area Menu for a Report/ Table/Function Module
Hi,
Is there any procedure to find out the <b>"AREA MEANU"</b> for a Report/Table/Function Module...
Or is there any Transaction code / Report is available to find out all the report for a particular "AREA MENU".
Thank you for your quick response...
Regards,
Thiru
<b></b>Hi,
Check these below threads:
user log in & log out time SAO
How to find user log-out time ?
Regards,
Nitin -
Does R3 have a report or function module to process payments requests?
HI All,
I want R3 report or function module which will receive payment requests from vendor or customer and then procees it depending on the data.
Does R3 have such a report or function module to process payments requests?
Please help me.
Thanks.yes SAP as got a function for this
you can you use trannsaction code /nF111
for these purposes -
Example of a Simple ALV Report using Function Modules (not OO)
Hi,
I am new to ABAP. Where can I get a proper Example of a Simple ALV Report using Function Modules? I searched the forum but did not find a proper solution. Kindly help.
Smruthi.
Edited by: Smruthi Acharya on Jan 29, 2009 7:13 PMHi,
Use this demo code:-
REPORT z_alv01 MESSAGE-ID zmsg.
* TABLES
TABLES : ekpo.
* TYPE POOLS
TYPE-POOLS : slis.
* TYPE DECLARATION
TYPES : BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
menge TYPE ekpo-menge,
END OF t_ekpo.
* PARAMETERS
PARAMETERS : s_var TYPE disvariant-variant.
* DATA DECLARATION
*VARIABLES
DATA : check(1),
rep_id TYPE sy-repid.
*INTERNAL TABLE TYPE OF ZEKPO
DATA : it_ekpo TYPE STANDARD TABLE OF t_ekpo WITH HEADER LINE.
*FIELD CATALOG
DATA : it_field TYPE slis_t_fieldcat_alv,
wa_field TYPE slis_fieldcat_alv.
*SORTING
DATA : it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
*FOR TOP OF THE PAGE
DATA : it_top TYPE slis_t_listheader,
wa_top TYPE slis_listheader.
*FOR END OF THE PAGE
DATA : it_end TYPE slis_t_listheader,
wa_end TYPE slis_listheader.
*TO CAPTURE EVENTS AND HANDLE
DATA : it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
*FOR GRID TITLE
DATA : wa_title TYPE lvc_title.
*FOR LAYOUT
DATA : wa_layout TYPE slis_layout_alv.
*FOR EXCLUDING STANDARD BUTTON FROM ALV TOOLBAR
DATA : it_exclude TYPE slis_t_extab,
wa_exclude TYPE slis_extab.
*FOR VARIANT
DATA : wa_variant TYPE disvariant.
* INITIALIZATION
INITIALIZATION.
check = 'X'.
rep_id = sy-repid.
wa_variant-report = sy-repid.
*GET DEFUALT ON THE SELECTION SCREEN FOR DEFAULT DISPLAY
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = wa_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0. " IF DEFAULT VARIANT FOUND
s_var = wa_variant-variant. " PASS THE DEFAULT VARIANT TO THE SELECTION SCREEN FIELD
ENDIF.
* AT-SELECTION SCREEN ON VALUE REQUEST
* TO GET THE F4 HELP FOR VARIANT
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_var.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = wa_variant
* I_TABNAME_HEADER =
* I_TABNAME_ITEM =
* IT_DEFAULT_FIELDCAT =
i_save = 'A'
* I_DISPLAY_VIA_GRID = ' '
IMPORTING
* E_EXIT =
es_variant = wa_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
s_var = wa_variant-variant. " PASS THE SELECTED VARIANT TO THE SELECTION SCREEN FIELD
ENDIF.
* AT-SELECTION SCREEN
* TO CHECK THE EXISTENCE FOR VARIANT
AT SELECTION-SCREEN.
wa_variant-variant = s_var.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = wa_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE w001.
ENDIF.
* START OF SELECTION
START-OF-SELECTION.
SELECT ebeln
ebelp
matnr
werks
menge
FROM ekpo
INTO TABLE it_ekpo.
* FIELD CATALOG
wa_field-fieldname = 'EBELN'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 10.
wa_field-seltext_l = 'PO #'.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'EBELP'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 10.
wa_field-seltext_l = 'Line Item'.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'MATNR'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 15.
wa_field-seltext_l = 'Material'.
* wa_field-input = check.
* wa_field-edit = check.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'WERKS'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 6.
wa_field-seltext_l = 'Plant'.
* wa_field-input = check.
* wa_field-edit = check.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'MENGE'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 10.
wa_field-seltext_l = 'Qty.'.
* wa_field-input = check.
* wa_field-edit = check.
wa_field-do_sum = check.
APPEND wa_field TO it_field.
CLEAR wa_field.
* SORT W.R.T. PURCHASE ORDER NUMBER
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
wa_sort-tabname = 'IT_EKPO'.
wa_sort-up = check.
wa_sort-subtot = check.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
* FOR GRID TITLE
wa_title = 'Hello'.
* FOR LAYOUT
wa_layout-zebra = check.
* FOR EXCLUDING STANDARD BUTTONS FROM ALV TOOLBAR
wa_exclude-fcode = '&OUP'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&ODN'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&OAD'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
* wa_exclude-fcode = '&AVE'.
* APPEND wa_exclude TO it_exclude.
* CLEAR wa_exclude.
wa_exclude-fcode = '&INFO'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
* POPULATE ALL EVENTS INTO INTERNAL TABLE
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event
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.
READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
wa_event-form = 'END'.
MODIFY it_event FROM wa_event INDEX sy-tabix.
CLEAR wa_event.
* DISPLAY RECORDS IN ALV GRID
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = rep_id
* i_callback_pf_status_set = 'PF'
i_callback_user_command = 'COMMAND'
i_callback_top_of_page = 'TOP'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
i_grid_title = wa_title
* I_GRID_SETTINGS =
is_layout = wa_layout
it_fieldcat = it_field
it_excluding = it_exclude
* IT_SPECIAL_GROUPS =
it_sort = it_sort
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
is_variant = wa_variant
it_events = it_event
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*& Form top
* TO WRITE THE HEADER
FORM top.
REFRESH it_top.
wa_top-typ = 'S'.
wa_top-key = text-001.
wa_top-info = rep_id.
APPEND wa_top TO it_top.
CLEAR wa_top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_top
* I_LOGO =
* I_END_OF_LIST_GRID =
* I_ALV_FORM =
ENDFORM. "top
*& Form end
* TO WRITE THE FOOTER
FORM end.
REFRESH it_end.
wa_end-typ = 'S'.
wa_end-key = text-001.
wa_end-info = rep_id.
APPEND wa_end TO it_end.
CLEAR wa_end.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_end
* I_LOGO =
* I_END_OF_LIST_GRID =
* I_ALV_FORM =
ENDFORM. "end
*& Form pf
* FOR PF-STATUS WITH USER DEFINED BUTTONS
* -->RT_EXTAB text
FORM pf USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZTG_PF_ALV'.
ENDFORM. "pf
*& Form command
* TO HANDLE USER ACTIONS AGAINST PF-STATUS
* -->UCOMM text
* -->SELFIELD text
FORM command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA : ok_code TYPE sy-ucomm.
ok_code = ucomm.
CASE ok_code.
WHEN 'T_DOWN'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'TOTAL DOWN'.
WHEN 'DOWN'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'DOWN'.
WHEN 'UP'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'UP'.
WHEN 'T_UP'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'TOTAL UP'.
ENDCASE.
ENDFORM. "command
Hope this helps you.
Thanks & Regards,
Tarun Gambhir -
Call report in function module
Hi All,
Please tell me how to call report in function module. i want input parameters of function module with same selection screen parameters of report. please tell to me .if possible provide the code.
Thanks,
Raju.Hi Kumar,
Incorporate the below logic in the FM that you have developed.
SUBMIT zreport WITH s_vbeln IN t_saleorder_range
WITH p_file EQ w_file
AND RETURN.
Note: Here, t_salerder_range is an internal table of type range. It has four fields just like selection-options...SIGN,OPTION, LOW and HIGH. Whatever the values that you pass here would be taken as the selection screen values for the report that you are calling.
Hope this is helpful
Thanks,
Babu Kilari -
How to edit ALV report using function modules
I have a ALV report , i want to edit the report
using function modules.
how can i do that...
Edited by: ms kumar on Mar 6, 2008 3:24 PMhi i had used this report with the check box,
using the fm of alvs.....
*& Report ZZZ00
REPORT ZPR_02.
TYPE-POOLS: SLIS.
TABLES:pa0002,pa0008.
data:begin of it_pa0002 occurs 0,
checkbox,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of it_pa0002.
data:begin of it_pa00021 occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
expand TYPE xfeld value 'X',
end of it_pa00021.
data:begin of it_pa0008 occurs 0,
pernr like pa0008-pernr,
begda like pa0008-begda,
endda like pa0008-endda,
ANSAL like pa0008-ANSAL,
LGA01 like pa0008-LGA01,
BET01 LIKE PA0008-BET01,
end of it_pa0008.
DATA: IT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELD_CAT1 TYPE SLIS_T_FIELDCAT_ALV,
IT_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
WA_FIELD_CAT TYPE SLIS_FIELDCAT_ALV,
WA_FIELD_CAT1 TYPE SLIS_FIELDCAT_ALV,
IT_LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS TYPE SLIS_ALV_EVENT,
IT_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER,
wa_keyinfo TYPE slis_keyinfo_alv.
CONSTANTS:c VALUE 'X'.
SELECT-OPTIONS: S_pernr FOR pa0002-pernr.
START-OF-SELECTION.
SET PF-STATUS 'DATA' .
PERFORM GET_DATA.
PERFORM BUILD_FIELD_CAT.
PERFORM GET_EVENTS.
PERFORM DISPLAY_DATA.
*& Form get_data
text
FORM GET_DATA .
SELECT pernr
begda
endda
vorna
nachn
FROM pa0002
INTO CORRESPONDING FIELDS OF TABLE IT_pa0002
WHERE pernr IN S_pernr.
ENDFORM. " get_data
*& Form build_field_cat
text
FORM BUILD_FIELD_CAT .
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'CHECKBOX'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Check Box'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'PERNR'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Personnel no'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'BEGDA'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Start date'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'ENDDA'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'End date'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'VORNA'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'First name'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'NACHN'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Last name'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'PERNR'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'Personnel no'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'BEGDA'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'Start date'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'ENDDA'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'End date'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'VORNA'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'First name'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'NACHN'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'Last name'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'PERNR'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'personnelno'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'BEGDA'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'begindate'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'ENDDA'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'enddate'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'ANSAL'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'annualsalary'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'LGA01'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'wagetype'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'BET01'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'Amount'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
ENDFORM. " build_field_cat
*& Form display_data
text
FORM DISPLAY_DATA .
it_layout-box_fieldname = 'CHECKBOX'.
it_layout-EDIT = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FIELD_CAT
IS_LAYOUT = IT_LAYOUT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = IT_pa0002.
ENDFORM. " display_data
*& Form get_events
text
FORM GET_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
IMPORTING
ET_EVENTS = IT_EVENTS .
READ TABLE IT_EVENTS INTO WA_EVENTS
WITH KEY NAME = SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC = 0.
WA_EVENTS-FORM = 'TOP_OF_PAGE'.
MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
ENDIF.
ENDFORM. " get_events
*& Form top_of_page
text
FORM TOP_OF_PAGE.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = 'EMPLOYEE DATA'.
APPEND WA_HEADER TO IT_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_HEADER
ENDFORM. "top_of_page
*& Form GUI_SET
FORM GUI_SET USING RT_EXTAB TYPE SLIS_T_EXTAB .
SET PF-STATUS 'DATA' .
ENDFORM. "GUI_SET
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
DATA:V_PERNR LIKE PA0002-PERNR.
CASE R_UCOMM.
WHEN 'DET'.
DATA: V_FLAG.
clear : v_flag.
LOOP AT IT_PA0002.
if it_PA0002-checkbox = 'X'.
v_flag = 'X'.
v_pernr = IT_PA0002-PERNR.
SELECT PERNR
BEGDA
ENDDA
VORNA
NACHN
FROM PA0002
INTO CORRESPONDING FIELDS OF TABLE IT_PA00021
WHERE PERNR = V_PERNR.
SORT IT_PA00021 BY PERNR.
DELETE ADJACENT DUPLICATES FROM IT_PA00021 COMPARING PERNR.
READ TABLE IT_PA00021 INDEX 1.
SELECT PERNR
BEGDA
ENDDA
ANSAL
LGA01
BET01
FROM PA0008
INTO TABLE IT_PA0008
FOR ALL ENTRIES IN IT_PA00021
WHERE PERNR = IT_PA00021-PERNR.
if not it_PA0008[] Is initial.
SORT IT_PA0008 BY PERNR.
delete adjacent duplicates from it_PA0008 comparing pernr.
READ TABLE IT_PA0008 INDEX 1.
endif.
endif.
enddo.
it_layout1-group_change_edit = c.
it_layout1-colwidth_optimize = c.
it_layout1-zebra = c.
it_layout1-detail_popup = c.
it_layout1-get_selinfos = c.
it_layout-expand_fieldname = 'EXPAND'.
wa_keyinfo-header01 = 'PERNR'.
wa_keyinfo-item01 = 'PERNR'.
IF NOT V_FLAG IS INITIAL.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = IT_LAYOUT1
IT_FIELDCAT = IT_FIELD_CAT1
I_TABNAME_HEADER = 'PA0002'
I_TABNAME_ITEM = 'PA0008'
IS_KEYINFO = wa_keyinfo
TABLES
T_OUTTAB_HEADER = IT_PA00021
T_OUTTAB_ITEM = IT_PA0008.
ENDIF.
CLEAR: IT_PA00021,IT_PA0002,IT_PA0008.
ENDLOOP.
WHEN 'BACK'.
EXIT.
ENDCASE.
ENDFORM. "USER_COMMAND
reward points if useful,
venkat. -
Function module to read all the views of material data
Dear all ,
Is there any function module to read all the views of material data ?
Like we have MATERIAL_MAINTAIN_DARK for updating all the views of material data , I need a function module to read all the views of material master.
Thanks & Regards
ShivanandHello,
Check these BAPI'S
<b>BAPI_MATERIAL_DISPLAY Display Material
BAPI_MATERIAL_GET_DETAIL Determine Details for a Material</b>
Regards,
Vasanth -
How to find function modules used in maintenance table views
Hi,
How do I find the function modules used in maintenance table views?
I'm using SM30 and trying to open the custom table but there is an error message saying CREATE DATA PROCESSING FUNCTION MODULE.
Thanks.
Kathhi
in se80 select functon group and put your table function group name there and click display. it will show you the function modules used for that tables.
Regards
Madhu -
Generate a url from a report or function module
Hi,
I'm trying to generate a url from a report and tried using the function module WWW_ITAB_TO_HTML in the report program, as , but i'm not able to get the expected results. The code is given below. Could someone please try and help me resolve this issue. Thanks in advance.
DATA: emp_name TYPE char80.
DATA: it_itabex TYPE zdb_ex_tty,
it_emp TYPE TABLE OF zis_emp,
it_org TYPE TABLE OF zis_org,
it_pos TYPE TABLE OF zis_pos,
it_pos_alloc TYPE TABLE OF zis_pos_alloc,
it_res TYPE TABLE OF zis_res,
it_res_alloc TYPE TABLE OF zis_res_alloc,
ls_itabex TYPE zdb_ex_s.
DATA: lv_filename TYPE string,
lv_path TYPE string,
lv_fullpath TYPE string,
lv_replace TYPE i.
DATA qstring LIKE it_itabex OCCURS 10.
DATA: url(200), url2(200), url3(200), fullurl(200).
FIELD-SYMBOLS: <fs_emp> LIKE LINE OF it_emp,
<fs_org> LIKE LINE OF it_org,
<fs_pos> LIKE LINE OF it_pos,
<fs_pos_alloc> LIKE LINE OF it_pos_alloc,
<fs_res> LIKE LINE OF it_res,
<fs_res_alloc> LIKE LINE OF it_res_alloc.
** Report Program to export data from database to Excel.
** Populate all the tables that have to be exported.
SELECT * FROM zis_org INTO TABLE it_org.
SELECT * FROM zis_pos INTO TABLE it_pos.
SELECT * FROM zis_pos_alloc INTO TABLE it_pos_alloc.
SELECT * FROM zis_emp INTO TABLE it_emp.
SELECT * FROM zis_res_alloc INTO TABLE it_res_alloc.
SELECT * FROM zis_res INTO TABLE it_res.
** Append the Column Header
CLEAR ls_itabex.
ls_itabex-ipp_pos_id = 'IPP Pos ID'.
ls_itabex-emp_name = 'Name'.
ls_itabex-dt_of_join = 'JoinedOn'.
ls_itabex-emp_status = 'Status'.
ls_itabex-org_name = 'Org'.
ls_itabex-prj_name = 'Project'.
ls_itabex-mgr_name = 'Line'.
ls_itabex-designation = 'Designation'.
ls_itabex-specialization = 'Specialization'.
APPEND ls_itabex TO it_itabex.
** Append all the tables into one internal table
LOOP AT it_pos_alloc ASSIGNING <fs_pos_alloc>.
CLEAR ls_itabex.
ls_itabex-ipp_pos_id = <fs_pos_alloc>-ipp_pos_id.
READ TABLE it_emp ASSIGNING <fs_emp> WITH KEY emp_guid = <fs_pos_alloc>-emp_guid.
IF sy-subrc = 0.
CONCATENATE <fs_emp>-emp_fname <fs_emp>-emp_lname INTO ls_itabex-emp_name SEPARATED BY space.
ls_itabex-dt_of_join = <fs_emp>-dt_of_join.
ls_itabex-emp_status = <fs_emp>-emp_status.
ls_itabex-specialization = <fs_emp>-specialization.
ENDIF.
READ TABLE it_pos ASSIGNING <fs_pos> WITH KEY ipp_pos_id = <fs_pos_alloc>-ipp_pos_id.
IF sy-subrc = 0.
ls_itabex-designation = <fs_pos>-designation.
READ TABLE it_org ASSIGNING <fs_org> WITH KEY org_id = <fs_pos>-org_id.
IF sy-subrc = 0.
ls_itabex-org_name = <fs_org>-org_name.
ls_itabex-mgr_name = <fs_org>-mgr_name.
ENDIF.
ENDIF.
READ TABLE it_res ASSIGNING <fs_res> WITH KEY org_id = <fs_org>-org_id.
ls_itabex-org_name = <fs_org>-org_name.
APPEND ls_itabex TO it_itabex.
ENDLOOP.
url = 'http://testweb/scripts/wgate/zvw10a/!?~language=en'.
url2 = '&~OkCode(LGON)=LGON&login-login_user='.
url3 = '&vbcom-vbeln='.
CONCATENATE url url2 url3 INTO fullurl.
WRITE: /'Staffing Excel'.
CALL FUNCTION 'WWW_SET_URL'
EXPORTING
offset = 12
length = 10
func = fullurl
TABLES
query_string = qstring
EXCEPTIONS
invalid_table = 1
OTHERS = 2.
Thanks & Regards,
Preethi.Check the below example program :
data: begin of itab occurs 0,
matnr type mara-matnr,
mtart type mara-mtart,
matkl type mara-matkl,
groes type mara-groes,
end of itab.
data: ifields type table of w3fields with header line.
data: ihtml type table of w3html with header line.
select * into corresponding fields of table itab
from mara up to 100 rows.
call function 'WWW_ITAB_TO_HTML'
EXPORTING
TABLE_ATTRIBUTES = 'BORDER=1'
TABLE_HEADER =
ALL_FIELDS = 'X'
tables
html = ihtml
fields = ifields
ROW_HEADER =
itable = itab
check sy-subrc = 0.
call function 'GUI_DOWNLOAD'
exporting
filename = 'c:\test.html'
tables
data_tab = ihtml.
Reward points if it is helpful
Thanks
Seshu -
Tracking Report using Function Modules
Hi Experts,
My scenario is to track a workflow report.
What i did was: I found a function module which gives the work item details of all task available in user business workplace.
What i need was : When i click on any one of the work item id it should display the whole history of that work item id. that is who and all executed that work item id.
For example it should display like the PREVIEW SECTION which is available in business workplace.
is there any FM which gives the whole history of the work item id?
Please guide me to solve this.
Thanks
Regards
SM NizamudeenHi,
What i did was: I found a function module which gives the work item details of all task available in user business workplace.
i was using the suggested function module to get all the work items.
now, i found the function module which gives all the work items.
thanks for your replies.
Problem Solved.
Thanks guys
Regards
SM Nizamudeen -
Calling report in function module.
having a problem with calling one Tcode for displaying report in A function module,
It is displaying the report perfectly, but it is not coming again in the Function Module, from This tcode of report display.
How I can solve the problem ?
Regards,
Study SAPI tested and it is working fine.
if you are trying using tcode. if program of transaction is executable program then ypu can use the submit and return option
FUNCTION ztest.
SUBMIT balvbt02 AND RETURN.
ENDFUNCTION. -
Replace Call transaction TCode: /AFS/MD04 Either Report or Function Module
Hi,
Is there any standard Function Module or Report that can replace the call transaction T-Code /AFS/MD04?
Please help me out?
Regards,
Chanda.Hi,
There is a function module 'ABAP4_CALL_TRANSACTION' to replace the call transaction see and check it.
Thanks & Regards,
Raghunadh. K
Moderator Message:Please stop responding to old threads, you're just pushing them up the list.
Edited by: Suhas Saha on Jan 25, 2012 4:38 PM -
Plz hlp me in understanding thz report and function modules used in it
TABLES: BKPF,
BSEG,
KNA1,
SKAT,
USR02,
T001W.
SELECTION-SCREEN: BEGIN OF BLOCK HEAD WITH FRAME TITLE TEXT-T01.
PARAMETERS : WERKS LIKE T001W-WERKS OBLIGATORY,
: HKONT LIKE BSEG-HKONT OBLIGATORY.
SELECT-OPTIONS: BUDAT FOR BKPF-BUDAT OBLIGATORY.
PARAMETERS : USNAM LIKE BKPF-USNAM.
SELECTION-SCREEN END OF BLOCK HEAD.
DATA: BEGIN OF ITAB OCCURS 50,
BUDAT LIKE BKPF-BUDAT,
BELNR LIKE BKPF-BELNR,
XBLNR LIKE BKPF-XBLNR, " City
BKTXT(15), " Drawee Bank
WRBTR LIKE BSEG-WRBTR,
KUNNR LIKE BSEG-KUNNR,
HKONT LIKE BSEG-HKONT,
SGTXT(15), " Instrument Type CHQ / DD/ PAY ORDER
ZUONR(10), " Instrument No
VALUT LIKE BSEG-VALUT, " Instrument Date
NAME1(25),
END OF ITAB.
DATA: TXT50 LIKE SKAT-TXT50,
PGNO TYPE I,
JUMP LIKE SY-LINCT,
DNAM(20).
DATA : FIELD LIKE HELP_VALUE OCCURS 0 WITH HEADER LINE.
DATA : CONTENTS(12) OCCURS 0 WITH HEADER LINE.
DATA : FLD(12).
AT SELECTION-SCREEN ON VALUE-REQUEST FOR USNAM.
FLD = 'usnam'.
PERFORM VALUES CHANGING FLD.
USNAM = FLD.
TOP-OF-PAGE.
PERFORM HEADER.
END-OF-PAGE.
WRITE: /10 'Prepared By',
45 'Checked By',
85 'Authorized By',
125 'Bank Officials Seal & Signature'.
WRITE: /0(170) SY-ULINE.
PGNO = PGNO + 1.
WRITE: /120 'Page No : ', PGNO.
START-OF-SELECTION.
PERFORM %BKPF.
PERFORM %BSEG.
PERFORM %KNA1.
PERFORM %SKAT.
PERFORM %WRITE.
END-OF-SELECTION.
JUMP = SY-LINCT - SY-LINNO - 2.
SKIP JUMP.
WRITE:/.
*& Form %BKPF
text
--> p1 text
<-- p2 text
FORM %BKPF.
SELECT BELNR
XBLNR
BUDAT
BKTXT
INTO (ITAB-BELNR,
ITAB-XBLNR,
ITAB-BUDAT,
ITAB-BKTXT)
FROM BKPF
WHERE BUKRS = 'GMKT' AND
BLART = 'DZ' AND
USNAM = USNAM AND
BUDAT IN BUDAT.
IF SY-SUBRC EQ 0.
APPEND ITAB.
CLEAR ITAB.
ENDIF.
ENDSELECT.
SELECT SINGLE ORT01 INTO DNAM FROM T001W WHERE WERKS = WERKS.
ENDFORM. " %BKPF
*& Form %BSEG
text
--> p1 text
<-- p2 text
FORM %BSEG.
LOOP AT ITAB.
SELECT WRBTR
HKONT
SGTXT
ZUONR
VALUT
INTO (ITAB-WRBTR,
ITAB-HKONT,
ITAB-SGTXT,
ITAB-ZUONR,
ITAB-VALUT)
FROM BSEG
WHERE BUKRS = 'GMKT' AND
BSCHL = '40' AND
SHKZG = 'S' AND
BELNR = ITAB-BELNR AND
HKONT = HKONT.
IF SY-SUBRC EQ 0.
MODIFY ITAB.
CLEAR ITAB.
ENDIF.
ENDSELECT.
ENDLOOP.
DELETE ITAB WHERE HKONT <> HKONT.
LOOP AT ITAB.
SELECT SINGLE KUNNR
INTO (ITAB-KUNNR)
FROM BSEG
WHERE BUKRS = 'GMKT' AND
( BSCHL = '15' OR BSCHL = '19' ) AND
SHKZG = 'H' AND
BELNR = ITAB-BELNR.
IF SY-SUBRC EQ 0.
MODIFY ITAB.
CLEAR ITAB.
ENDIF.
ENDLOOP.
ENDFORM. " %BSEG
*& Form %KNA1
text
--> p1 text
<-- p2 text
FORM %KNA1.
LOOP AT ITAB.
SELECT NAME1
INTO (ITAB-NAME1)
FROM KNA1
WHERE KUNNR = ITAB-KUNNR.
IF SY-SUBRC EQ 0.
MODIFY ITAB.
CLEAR ITAB.
ENDIF.
ENDSELECT.
ENDLOOP.
ENDFORM. " %KNA1
*& Form %WRITE
text
--> p1 text
<-- p2 text
FORM %WRITE.
SORT ITAB BY BUDAT BELNR.
LOOP AT ITAB.
WRITE:/ SY-TABIX,
ITAB-BELNR,
ITAB-BUDAT,
ITAB-SGTXT,
ITAB-ZUONR,
ITAB-VALUT,
ITAB-KUNNR,
ITAB-NAME1,
ITAB-BKTXT,
ITAB-XBLNR,
ITAB-WRBTR.
AT LAST.
SUM.
WRITE: /0(170) SY-ULINE.
WRITE: /126 ' Total Amount :', ITAB-WRBTR COLOR 3.
ENDAT.
ENDLOOP.
WRITE: /0(170) SY-ULINE.
ENDFORM. " %WRITE
*& Form %SKAT
text
--> p1 text
<-- p2 text
FORM %SKAT.
SELECT TXT50
INTO TXT50
FROM SKAT
WHERE SAKNR = HKONT AND
SPRAS = 'EN' AND
KTOPL = 'GMKT'.
ENDSELECT.
ENDFORM. " %SKAT
*& Form HEADER
text
--> p1 text
<-- p2 text
FORM HEADER.
CONCATENATE DNAM '-' 'Depot' INTO DNAM.
WRITE: /50 'Grasim Industries Limited'.
WRITE: /55 DNAM.
WRITE: /40 'Pay-in-Slip for Cheques / Drafts / Pay-Order'.
SKIP 3.
WRITE:/ 'Account Number :', HKONT, 135 'Payslip No :'.
WRITE:/ 'Account Name :', TXT50, 135 'Date :'.
SKIP 1.
WRITE: /0(170) SY-ULINE.
WRITE: /07 'Sl No', 13 'Voucher No', 27 'Date', 36 ' Inst Type ',
51 'Ins Number', 65 'Date', 73 'Party Code',
87 'Name of the Party',
114 'Drawee Bank', 130 'City', 147 'Amount in Rs',
162 'Remarks'.
WRITE: /0(170) SY-ULINE.
ENDFORM. " HEADER
*& Form VALUES
text
<--P_FLD text *
FORM VALUES CHANGING P_FLD.
REFRESH CONTENTS.
REFRESH FIELD.
CLEAR CONTENTS.
CLEAR FIELD.
FIELD-TABNAME = 'USR02'.
FIELD-FIELDNAME = 'BNAME'.
FIELD-SELECTFLAG = 'X'.
APPEND FIELD.
SELECT * FROM USR02.
CONTENTS = USR02-BNAME.
APPEND CONTENTS.
ENDSELECT.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
CUCOL = 0
CUROW = 0
DISPLAY = ' '
FIELDNAME = 'BNAME'
TABNAME = 'USR02'
NO_MARKING_OF_CHECKVALUE = ' '
TITLE_IN_VALUES_LIST = ' '
TITEL = ' '
SHOW_ALL_VALUES_AT_FIRST_TIME = ' '
NO_CONVERSION = ' '
IMPORTING
SELECT_VALUE = FLD
TABLES
FIELDS = FIELD
VALUETAB = CONTENTS
EXCEPTIONS
FIELD_NOT_IN_DDIC = 1
MORE_THEN_ONE_SELECTFIELD = 2
NO_SELECTFIELD = 3
OTHERS = 4.
ENDFORM. " VALUESHi Surinder,
the program gives u the o/p based on input parametrs in the following format.
<b>TOP-OF-PAGE</b>
CET TECHNOLOGIES PTE LTD.
PAGE: 2
LIST OF ALL VENDOR BY VALUE (FOREIGN)
DATE: 07/05/2007
DATE RAISED FROM: 06/01/2007 TO 06/06/2007
TIME: 15:34:27
FOR ALL PURCHASING GROUPS
(Following are the columns of the output tabel, becz of space constraint, i am writing it horizontaly).
- S/No
- SUPPLIER Name
- AMOUNT(S$) => At last, it will calculate Total Amount in $
- % OF AMOUNT
- CUML OF Total amount
- NO OF PO
- NO OF ITEMS
TOTAL: 0.00 0
Function module is used to convert the amount from Singapore$ to local curreny.
(Suppose, total amount is S$100, and u r calculating for US, FM will convert the S$100 into corresponding value in US$ or
Let us take India - For India, say S$1 = INR 27, then say the supplier from India, quotes Rs. 2700, it will then be converted and shown as S$27)
Hope this will be useful to understand
Reward if useful
Thnks
Sujay -
Required function module to Update MM-classification view
Hi Floks,
i got one object on MM, some material having the classificaton view and some material dont have, but my requirement is i need to update the classification view, Do you know any idea about , what is the function module is required ?
Thanks
Siva Prasad
Sap-Practicethe trick, when looking for these bapis, is NOT to look with material master bapis, but under cross application->classification->objectclassification... (in tcode BAPI)
you will se the bapis you need.
one thing, when you look in transaction bapi, all bapis for classification are shown with a _KEY suffix. the ones you want are WITHOUT the _KEY suffix...
we use these all of the time.
Maybe you are looking for
-
Failed to deploy a simple application on weblogic 10.3.6 in eclipse
Hi All, I'am unable to deploy a very simple application via eclipse indigo/juno 4.2 I get the following exception: Runtime exception occurred in publish task 'SplitsrcTargetPreparation' See attached screenshot http://imageshack.us/a/img109/4338/scree
-
Translation of column in COOIS
Dears, I 'd like to change the translation of one column in COOIS. Can you advise how to do this ? Should I use SE63, which object ? thanks a lot KS
-
When running Firefox in Kaspersky security mode, MOZCRT19.dll not found
I use Kaspersky Internet Security which has an extra security feature. When using that additional feature and I attempt to open Firefox, I get an error message saying that MOZCRT19.dll cannot be located.
-
Remove a task from a ScheduledThreadPoolExecutor
hi , i have a small program that creates a ScheduledThreadPoolExecutor , and insert one Runnable task into it. the task should be preformed for given time and then cancelled. but for some reason i can't remove the task from the thread pool , and it k
-
Problem using Radial Gradient tool in Creative Suite CS4.
I have pasted on a separate layer a circular photo of a couple's head and shoulders onto a woodland photo, and want to make the sides of it gradiently transparent using the Radial Gradient tool. The problem I have is that it makes all of the photo gr