Hi all dialog program experts no solution coming
hi all
i would like to know if there any program where coding for below icon is available (not in alv or oops), where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality of icons in dialogue prog and not how to display icons ).
thanx
rocky
hi all
i would like to know if there any program where coding for below icon is available (not in alv or oops), where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality of icons in dialogue prog and not how to display icons ).
thanx
rocky
Similar Messages
-
hi all
i would like to know if there any program other than alv or oops, where icon are used for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
i have to use these icons in my dialog program.
my other question is how to achieve sum and subtotal in dialog program. in my program i have created table control and in that for some fields i need to show total and subtal, pl guide on this urgently.
thanx
rockyHi,
Concerning the icons you can always execute transaction ICON to see the list of existing iconsin SAP
To display an icon either use you have sevarl ways to do this:
WRITE: '@OV@' TO L_STRING.
WRITE: ICON_OKAY AS ICON
Regards -
Hi experts, dialog program no solution from forum
hi all
i would like to know if there any program other than alv or oops, where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality in dialogue prog and not how to display icons ).
thanx
rockyHi,
have a look to transactions LIBS BIBS
Fred -
I have suddenly lost cthe scrolling function in mail and cannot scroll down an individual email or the list of emails in a box. The scrolling function is perfectly okay in all other programs. Can anyone help, please?
Disclaimer
The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
Liability Disclaimer
In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
Posting
Another example would be a p2p link between two L3 switches. -
Dialog programming, data being washed out in TAB Control
Hi,
i am working on dialog programming , in which i am using Table Control for user input (data is not coming from database table) . everything is going well till assignment of data to internal table but when
control goes to PBO by any means like pressing ENTER etc. then data being washed out.
PROCESS BEFORE OUTPUT.
MODULE TC_CONTROL.
LOOP AT it_data
INTO wa_data
WITH CONTROL tc_control
CURSOR tc_control-current_line.
MODULE tc_control_get_lines.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT IT_DATA.
CHAIN.
FIELD WA_DATA-FREPS_N.
FIELD wa_data-TOEPS_N.
FIELD wa_data-PRCH_A.
FIELD wa_data-SRVC_AMT .
FIELD wa_data-ACCNT_C.
FIELD wa_data-AMT_D.
FIELD wa_data-NARR_X.
FIELD wa_data-CRPRD_N.
MODULE tc_control_modify ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
*Abap program
MODULE TC_CONTROL OUTPUT.
DESCRIBE TABLE it_data LINES tc_control-lines.
ENDMODULE. " TC_CONTROL OUTPUT
CONTROLS: TC_CONTROL TYPE TABLEVIEW USING SCREEN 1000,
TC_CONTROL1 TYPE TABLEVIEW USING SCREEN 1000.
DATA: G_TC_CONTROLS_LINES LIKE SY-LOOPC,
G_TC_CONTROLS_LINES1 LIKE SY-LOOPC.
*& Module tc_control_get_lines OUTPUT
text
MODULE tc_control_get_lines OUTPUT.
g_tc_controls_lines = sy-loopc.
move-corresponding it_data to wa_data.
ENDMODULE. " tc_control_get_lines OUTPUT
MODULE tc_control_modify INPUT.
move-corresponding wa_data to it_data.
MODIFY it_data
FROM wa_data
INDEX tc_control-current_line.
append it_data.
clear it_data.
ENDMODULE. " tc_control_modify INPUT
Please suggest me any clue.
Thanks in advance
vijay dwivediHi ,
I have understood the problem.
In your ABAP code replace all the occurrrences of wa_data with the structurename.
Use the TABLES keyword to declare the structure .That structure will be same as
reference table of the table control .
Here the structure is SPFLI.
Check the bellow code , it will resolve the issue.
ABAP code - -
program zsdn.
tables spfli. " Declare the structure
data : it_data like table of spfli with header line,
*wa_data TYPE spfli, " commented
w_i type i.
*CONTROLS TC_CONTROL TYPE TABLEVIEW USING SCREEN 100.
controls: tc_control type tableview using screen 1000,
tc_control1 type tableview using screen 1000.
data: g_tc_controls_lines like sy-loopc,
g_tc_controls_lines1 like sy-loopc.
module tc_control output.
describe table it_data lines tc_control-lines.
endmodule. " TC_CONTROL OUTPUT
module tc_control_get_lines output.
g_tc_controls_lines = sy-loopc.
move-corresponding it_data to spfli.
endmodule. " tc_control_get_lines OUTPUT
module tc_control_modify input.
move-corresponding spfli to it_data.
modify it_data
from spfli
index tc_control-current_line.
append it_data.
clear it_data.
endmodule. " tc_control_modify INPUT
module status_0100 output.
set pf-status 'STAT'.
* SET TITLEBAR 'xxx'.
endmodule. " STATUS_0100 OUTPUT
module user_command_0100 input.
case sy-ucomm.
when 'BACK' or 'EXIT' or 'CANCEL'.
leave to screen 0.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
*& Module POPLATE_TABLE OUTPUT
* text
module poplate_table output.
if it_data is initial.
select * from spfli into table it_data.
endif.
endmodule. " POPLATE_TABLE OUTPUT
Screen code (Scr no 1000) - -
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE poplate_table.
MODULE tc_control.
LOOP AT it_data WITH CONTROL tc_control CURSOR w_i.
MODULE tc_control_get_lines.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE user_command_0100.
LOOP AT it_data.
MODULE tc_control_modify ON CHAIN-REQUEST.
* ENDCHAIN.
ENDLOOP.
Regards
Pinaki -
Hi all,
Fora search help in dialog program.
I HAVE TO GET SEARCH FOR A FIELD ZID ON APARTICULAR SCREEN BASED ON DATA, MODIFIED BY AND A PLANT..
I HAVE A RECORD IN ONE MY ZTABLE.
I HAVE TO GET THAT BY SEVERAL SEARCH PARAMETERS SAY BY DATE , MODIFIED BY,PLANT ETC.
each user has been assigned a plant , so in search he has to get records belonging to that plant.
so i cannot include plant in my search help, because user may type in other plant.
so i tried two ways
1) i created a search help in se11 including the plant field again the problem arises if the user types a different plant.
so i want to know whether we can apassa value to plant field in search help(i.e the plant assigned to the user),
i have this kind of thing in some standard t -code i.e especially for searching material , the plant field in search help was filled by one plant.
this should be one of the solution
2)I tried to write a code in pov of program code.
this is how my code looks.
DATA : BEGIN OF ITAB OCCURS 0.
INCLUDE STRUCTURE ZXXX.
DATA : END OF ITAB.
ITAB HAS FIELDS ID, DATE , MODIFIEDBY , PLANT.
USER_PLANT = 'ABC'.
SELECT * FROM ZXXX INTO TABLE ITAB WHERE PLANT = USER_PLANT.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'ZID'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE = 'TEST'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
TABLES
VALUE_TAB = ITAB
FIELD_TAB =
RETURN_TAB = IT_RETURN4
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if sy-subrc = 0.
clear itab.
read table it_return4 index 1.
ZXXX-ZID = it_return4-fieldval.
endif.
THIS WORKS FINE , BUT HE CANNOT SEARCH BASED ON DATE AND MODIFIEDBY
ALL i want is is get a pop up window and should be able to search based on data and modifiedby for a predifined plant.
I hope iam clear.
ThanksHi,
Create a FM with the following code..The interface is defined in the code..
In the Function module top include add the following code.
<b>TYPE-POOLS: shlp, vrm.</b>
IN this code I am deleting the records that are not of the currency USD...
Do the same thing for your requirement...
FUNCTION Y_SEARCH_HELP_EXIT.
""Local interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" REFERENCE(SHLP) TYPE SHLP_DESCR_T
*" REFERENCE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
where z_test is my z table..
DATA: ITAB LIKE Z_TEST OCCURS 0 WITH HEADER LINE.
ITAB[] = RECORD_TAB[].
IF NOT RECORD_TAB[] IS INITIAL.
DELETE ITAB WHERE WAERS <> 'USD'.
RECORD_TAB[] = ITAB[].
ENDIF.
ENDFUNCTION.
Thanks,
Naren -
Dialog Programming : Input value
Hi Experts,
I have programmed a Dialog programe.
In my input Screen i have a field called 'New Project'. ( PROJ-PSPID)
The user must not be able to enter value directly into this field but must always be able to select it from the F4 HElp.
I'm using the Function module 'CN_SUCHE_FREIE_NUMMER' as F4 help for the field 'NEW_PROJECT' ( to obtain the next available project number.), in the event Process on value request.
But I should not allow the user to enter any value directly, instead he must always select from the F4 Help.
I have seen many post, but the answer is provided when they r using the Function module 'F4IF_FIELD_VALUE_REQUEST'.
But my F4 help Func module is different , it is 'CN_SUCHE_FREIE_NUMMER'.
Thanks in Advance,
VidyaHi All,
Thanks for the replies.
The function maodule 'CN_SUCHE_FREIE_NUMMER' needs the user to press the 'Find' button , hence i need to provide it to the user, such that he does the action, if you can jst plz check out the FM 'CN_SUCHE_FREIE_NUMMER', it would be of great help .
Also,
I cannot predict the next project number available (as it is dynamic ,determined from the number range), hence i cannot provide the list nor drop down
The requirement is to get the next project number available during creation of the project(CJ20n)( Custom program is been done : BDC program ) .
Wish to get your inputs,
Vidya -
How to Execuate Dialog program in backgroud
Hi,
I am doing with dialog program which going to save values in database using bapi, there is two buttons available in my program one is save and another one is background, when the user clicks save, values will be saved in online, suppose if the user clicks background, my dialog program should be run in background to store the values in database.
I appreciate if experts provide tips to overcome this issue.Hello,
Submit the same program in background mode and pass all the required parameters
*part for background processing
DATA: lv_job_name LIKE tbtco-jobname,
lv_job_nr LIKE tbtco-jobcount,
lv_job_released TYPE c,
lv_job_start_sofort TYPE c,
lv_print_parameters TYPE pri_params.
lv_job_name = 'ZPGM_NAME'. " your pgm name goes here
* used to avoid spaces in the display
DATA: lv_job_name_string TYPE string.
lv_job_name_string = lv_job_name.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_nr
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF syst-subrc = 0.
*submit job with all the selection screen params...
SUBMIT (lv_job_name)
WITH applfile = applfile " parameters start here
WITH p_lines = p_lines
WITH rfc_dest = rfcdest
WITH p_selmtd = lv_selmtd
WITH px_shsim = px_shsim
WITH px_sherr = px_sherr " parameters end here
USER syst-uname
VIA JOB lv_job_name NUMBER lv_job_nr AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_job_released
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF syst-subrc <> 0.
MESSAGE i162(00) WITH
'An error occured while closing the background job.'.
STOP.
ENDIF.
ENDIF.
ENDIF.
SKIP 1.
WRITE: / 'Background process', lv_job_name_string , 'called successfully' NO-GAP.
WRITE: / 'You can check the job in transaction SM37'. -
Dialog Programming Requirement
Hello Guys!
Hope u all doing well.
Any one have done any real time scenario on dialog programs
Any Custom module pool program u ve developed.
Pls tell the requirement
4r which records, tables Used.
Pls give ur solution for the development with steps by steps in detail.
Hoping for your replies eagerly.
Thanks all.Hi,
check below code , use delete_text after get_text_as_r3table method.
CALL METHOD editor->get_text_as_r3table
IMPORTING
table = li_text_table
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
error_dp_create = 3
potential_data_loss = 4.
CALL METHOD editor->delete_text
EXCEPTIONS
error_cntl_call_method = 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.
CALL METHOD editor->set_text_as_r3table
EXPORTING
table = li_text_table
EXCEPTIONS
error_dp = 1
error_dp_create = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
I have done the coding using above methods which is exactly like your requirement , it is working fine for me.
Regards
Appana
Message was edited by: L Appana -
What is difference between report programming and dialog programming?
hi,
what is difference between report programming and dialog programming? plz provide some example code
byeABAP programming
Basically reports are used to read database and represent the results in lists.
Reports are collections of processing blocks that the system calls depending on events.
We can use reports to evaluate data from database tables.
Reports are stand alone programs and controlled by events.
A report itself never creates events
steps in report:
Processing the selection screen
Reading the database
Evaluating the data and creating lists
Outputting a list.
1st u write simple logics, after that u can enhance the code as step by step.
http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/index.htm
http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
http://www.sapdev.co.uk/reporting/reportinghome.htm
Dialog Programming
Structure of a Dialog Program
A dialog program consists of the following basic components:
Screens (dynpros)
Each dialog in an SAP system is controlled by dynpros. A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly one dialog step. The flow logic determines which processing takes place before displaying the screen (PBO-Process Before Output) and after receiving the entries the user made on the screen (PAI-Process After Input).
The screen layout fixed in the Screen Painter determines the positions of input/output fields, text fields, and graphical elements such as radio buttons and checkboxes. In addition, the Menu Painter allows to store menus, icons, pushbuttons, and function keys in one or more GUI statuses. Dynpros and GUI statuses refer to the ABAP/4 program that control the sequence of the dynpros and GUI statuses at runtime.
ABAP/4 module pool
Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules. The flow logic of a dynpro contains calls of modules from the corresponding module pool. Interactive modules called at the PBO event are used to prepare the screen template in accordance to the context, for example by setting field contents or by suppressing fields from the display that are not needed. Interactive modules called at the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
All dynpros to be called from within one transaction refer to a common module pool. The dynpros of a module pool are numbered. By default, the system stores for each dynpro the dynpro to be displayed next. This dynpro sequence or chain can be linear as well as cyclic. From within a dynpro chain, you can even call another dynpro chain and, after processing it, return to the original chain.
Check this link for basics.
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
Check this link for Dialog Programming/Table Control
http://www.planetsap.com/Tips_and_Tricks.htm#dialog
Check this SAP Help for Dialog Program doc.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
Check this SAP Help link for Subscreens.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
Check this link for subscreen demo program.
http://abapcode.blogspot.com/2007/05/demo-program-to-create-subscreen-in.html
Also check this link too.
http://abapcode.blogspot.com/2007/06/dialog-programming-faq.html
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld004.htm
http://help.sap.com/saphelp_nw04/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ccf35c111d1829f0000e829fbfe/frameset.htm
http://abapprogramming.blogspot.com/ -
Please help. I have been using itunes with my ipod nano for years. Several months ago I did a requested upgrade and have not been able to open itunes since. I get an error message that says that itunes was not installed correctly. Error 7 (Windows error 126) I have tried to uninstall all Apple programs and reinstall itunes several times and it doesn't work. I keep getting the same message. I am looking for a solution to get my library back so I can but more songs for my ipod.
I have same problem--did you ever find a solution?
-
How to call a dialog program with return value in another dialog program
Dear All,
How can I call a dialog program with return value from another dialog program?
Regards,
Alok.Hi Alok,
You can you SET/GET parameters to do this.
This is some information about this.
To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
To fill one, use:
SET PARAMETER ID pid FIELD f.
This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
To read an SPA/GPA parameter, use:
GET PARAMETER ID pid FIELD f.
This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
Thanks,
SriRatna -
How to call a Dialog Program from another Dialog Program
Dear All,
How can I call a dialog program with return value from another dialog program?
Regards,
Alok.Hi Alok,
1. Insted of creating 2 different Dialog program. It's good to create as many screens as you want in same module pool program. Any way you can use the different TCODE for each screen.
2. Another and The best way is to create a function group and then inside function group use the function 2 module... In the function group define a global variable which will be present for both the function group if they are getting executed in sequence. and inside the Function Module call the screens using command " call screen <screenno>".
3. You can use set / get parameter to pass values of a field between two dynpro program. -
Using CheckBox / Radio-Button Control in Dialog Program
Dear Friends,
Please let me know the way to use check-box / radio-button control in dialog programs. Where & how to define them & write the logic.
If possible provide a small example.
Regards,
Alok.Hi,
goto tcode abapdocu.. abap user dialogs - screens-processing screens you will get examples for all --pushbutt6ons radiobutton checkboxes everything
<b>here is a sample code for you</b>
PROGRAM demo_dynpro_check_radio .
DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,
field1(10) TYPE c, field2(10) TYPE c, field3(10) TYPE c,
box TYPE c.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
CALL SCREEN 100.
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'RADIO'.
IF radio1 = 'X'.
field1 = 'Selected!'.
CLEAR: field2, field3.
ELSEIF radio2 = 'X'.
field2 = 'Selected!'.
CLEAR: field1, field3.
ELSEIF radio3 = 'X'.
field3 = 'Selected!'.
CLEAR: field1, field2.
ENDIF.
WHEN 'CANCEL'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
<b>flow logic:</b>
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
MODULE user_command_0100.
regards,
pankaj singh.
<i><b>
reward if helpful</b></i> -
User Authorisations in Dialog Programming.
Hi Friends,
I have a small requirement, I want to create user authorisations in dialog programming.
Actually client requirement is he want to enter absence details of each and every branch.
For that i have created a cusom table and i also i have developed a dialog program inorder to update the details
and to retrive all the data i have created a report program also.
Now the client requirement is he want user authorisations while updating the data through dialog programming, that means if a user loging in that particular branch he want to enter the absence details pertaining to that branch only, when he tries to enter the details of other employee pertaining to another branch an error should be raised.
Actually in the client place they are using authrisation object as 'Z_WERKS'. The basis person has created this and provided for me.
Actually i have created an Authority check in module pool program.Here iam attaching my prog,
Pls provide me the sample code if at all available.
*& Include ZEMPTOP Module pool
PROGRAM ZEMP.
TABLES : ZABS,PA0001.
DATA : WA_PA0001 LIKE PA0001,
V_ANS.
DATA: BEGIN OF Z_WERKS OCCURS 0,
PERSA LIKE T500P-PERSA,
NAME1 LIKE T500P-NAME1,
END OF Z_WERKS.
*& Include ZEMPI01
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'DISP'.
SELECT SINGLE * FROM ZABS WHERE PERNR = ZABS-PERNR.
IF SY-DBCNT <> 0.
*MESSAGE I000(Z00) WITH 'Details of' ZABS-PERNR .
else.
MESSAGE I000(Z00) WITH 'No Details Available to Display'.
ENDIF.
WHEN 'EXIT'.
LEAVE PROGRAM.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'CLS'.
CLEAR ZABS.
WHEN 'INS'.
INSERT ZABS .
ZABS-ABWTG = ZABS-ENDDA - ZABS-BEGDA + 1.
IF SY-DBCNT <> 0.
MESSAGE I000(Z00) WITH 'Personnel No' ZABS-PERNR
'inserted successfully'.
ENDIF.
CLEAR ZABS.
WHEN 'MOD'.
UPDATE ZABS.
ZABS-ABWTG = ZABS-ENDDA - ZABS-BEGDA + 1.
IF SY-DBCNT <> 0.
MESSAGE I000(Z00) WITH 'Personnel No' ZABS-PERNR
'Modified Successfully'.
ENDIF.
CLEAR ZABS.
*WHEN 'DEL'.
*CALL FUNCTION 'POPUP_TO_CONFIRM_LOSS_OF_DATA'
EXPORTING
TEXTLINE1 = 'ARE YOU SURE'
TEXTLINE2 = 'YOU WANT TO DELETE'
TITEL = 'CONFIRMATION'
START_COLUMN = 25
START_ROW = 6
DEFAULTOPTION = 'N'
IMPORTING
ANSWER = V_ANS.
*IF V_ANS = 'J'.
*DELETE ZABS.
*IF SY-DBCNT <> 0.
*MESSAGE I000(Z00) WITH 'Personnel No' ZABS-PERNR
*'Deleted Successuflly'.
*ELSE.
*MESSAGE I000(Z00) with 'No Record to Delete'.
ENDIF.
*ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module GET_REC INPUT
text
MODULE GET_REC INPUT.
SELECT SINGLE * FROM PA0001 INTO WA_PA0001
WHERE PERNR = ZABS-PERNR.
MOVE: WA_PA0001-PERNR TO ZABS-PERNR,
WA_PA0001-ENAME TO ZABS-ENAME,
WA_PA0001-GSBER TO ZABS-GSBER,
WA_PA0001-WERKS TO ZABS-WERKS.
ZABS-ABWTG = ZABS-ENDDA - ZABS-BEGDA + 1.
ENDMODULE. " GET_REC INPUT
*& Module CHECK_AUTH_WERKS INPUT
text
MODULE CHECK_AUTH_WERKS INPUT.
*SELECT PERSA INTO TABLE _WERKS FROM T500P
WHERE PERSA = ZABS-WERKS.
AUTHORITY-CHECK OBJECT 'Z_WERKS'
ID 'PERSA' FIELD Z_WERKS-PERSA.You need to test the sy-subrc after the authority check - that will indicate whether the user has the authorisation or not.. you also often include the activity being tested e.g. generally 03 = Display, 02 = Update etc
AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
ID 'ACTVT' FIELD '03'
ID 'CUSTTYPE' FIELD 'B'.
IF not SY-SUBRC is initial.
MESSAGE E... "put your exception here...
ENDIF.
see [Programming Authorization Checks |http://help.sap.com/saphelp_nw04/helpdata/en/52/6712ac439b11d1896f0000e8322d00/content.htm] for more info.
Jonathan
Maybe you are looking for
-
Report to show me how many invoices are being processed by users
Hi, I am currently working as a Accounts Payable Supervisor and I would like to run a report to show me how many invoices are being processed by users in my team. Currently I am using Transaction F.98 (Posted Docs by user report), but this report
-
How can i see my kernel level patch.
Dear Friends, How can i see my kernel level patch. sach
-
Problem while Calling a CGI pgm From Java with code sample
Hey guys, I am calling a CGI program from java servlet, while calling cgi program I am passing encoded(Base64) content via post process, My problem is the encoded data is not posted as expected, the encoded data is corrupting. But when I send encoded
-
VERY UREGENT:UPGRADATION FROM BW 3.0B TO SAP NETWEAVERS
HI ALL, We are currently planning to Upgrade TO SAP Netweavers 2004 (BI).Our Current version is 3.0B.Now We are planning about the preupgrade Activities.As far as the upgrade plan is concerned ,Our client is currently only concerned about Technical u
-
WRT54GS connection to Sony Blu Ray BDP-S370
I just purchased a Sony Blu Ray player and am trying to use a wired connection to my WRT54GS. I was initially unable to establish a connection at all, but after chatting with tech support at Sony, we were able to get it to connect. Shortly after I