EDIT LOCK in a Z Function Module
I would like to delete the edit lock in a Z Fm.
I check the table TRDIR entries and this FM is not existing there. In TFDIR, it exists though.
Modification assistant is also in disable mode.
How do I remove this?
Thanks,
Kiran
Ok then one last method is there, but i would suggest that still try to find other ways and use it only as last resort, and do discuss with your manager first.
open inlcude program LSEUQF02
go to the subroutine "accp_enqueue_and_corr_check"
put a breakpoint here. and then in debugging temporarily set the value of field suppress_editor_lock_check as X
then you will be able to make the changes.
PLEASE USE THIS METHOD ONLY AFTER CONSULTATION WITH YOUR MANAGER AND AS A LAST RESORT
кu03B1ятu03B9к
Similar Messages
-
Lock a ztable using function module or memory id
hello experts,
i am facing a problem in ALV grid output (editable) - when user editing and saving data into the ztable - other user should not able to save the data and error msg to be displayed.
i am using the function modules for locking the whole table - enqueue_eztable and dequeue_eztable. i can see the table as locked in sm12, but i can also do the updating and save data.
is there anyother function module to work with?
another way i am doing is -
DATA: text4 TYPE c,
text5 TYPE c.
IMPORT text4 TO text5 FROM MEMORY ID 'Y222'.
IF sy-subrc = 0.
IF text5 = 'X'.
MESSAGE e000(z1) WITH 'SOME USER IS ACCESSING THE PROGRAM'.
ENDIF.
ELSE.
EXPORT text4 = 'X' TO MEMORY ID 'Y222'.
PERFORM update_dbase.
FREE MEMORY ID 'Y222'.
ENDIF.
this method also not working.
plz help me, how to avoid other user accessing the data when another user is working on it?
thanks.Hi,
Create lock object for the table and use below method
Lock Table ZWMDASHBOARD
CALL FUNCTION 'ENQUEUE_EZWMDASHBOARD'
EXPORTING
mode_zwmdashboard = 'E'
mandt = sy-mandt
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
RAISE unable_to_lock. " Exception
ELSE.
Modify Table ZWMDASHBOARD.
MODIFY zwmdashboard FROM TABLE t_zwmdashboard[].
IF sy-subrc <> 0.
Do Nothing
ENDIF.
Unlock table ZWMDASHBOARD.
CALL FUNCTION 'DEQUEUE_EZWMDASHBOARD'
EXPORTING
mode_zwmdashboard = 'E'
mandt = sy-mandt.
ENDIF.
Hope this helps.. -
Unalbe to delete lock entry table using Dequeue function module
Friends,
I display a base ALV list with custom app. tool bar. When i click on a button, i submit another report which updates a z-table for that corresponding row. I create a lock object for this entry before submitting the report. After updating the table, I try to delete the lock object using dequeue function module in the called report, but though the subrc is 0, the lock entry is not getting deleted in SM12. The called report, after dequeue, again submits report 1 (the caller). So, when i try to do some operation for the same row which I first selected, it triggers Foreign_lock exception. When I completely go out of the base list, only then the entry is deleted. Can anyone tell me the reason? I have tried with parameters _SCOPE & _SYNCHRON, but same result.
Regards,
Sathish RHi,
The triggering of the dequeue is not in the proper position as it need to be placed.
Thats the only problem as per u have described the issue.
Place the deque as soon as the report is return the value.
I hope it may work ur issue. -
Function modules upon activation of locked objects?
What are the names of the functional modules that will be generated upon activation of locked objects?
Prior to creating setting any locks in an ABAP program, a lock objects must be created in the ABAP dictionary.
When the lock object is created, the system will automatically generated the two function modules required for locl management.
The First function module used to set locks is the ENQUEUE_<lock Object Name>. This function module is used to generate a lock entry in the lock table. If the lock cannot be set for any reason then this would be reflected in the return code.
The second function module used to release locks is the DEQUEUE_<Lock Object Name>. Thus function module will remove a lock entry from the lock table.
These Function modules are used to set and release locks in an ABAP program. The programmer simply perform the specific "CALL FUCNTION.."
statemen for each functiom module.
These lock functiom modules are executed in a specific work process with the SAP system dedicated to lock management, This work process is run on a single server that maintains the central lock table for entire SAP system.
There are two types of locks that can be set:
Shared lock - is a read only lock that prevents data from being changed while a user is reading it.
Exclusive lock- is a rite lock that prevents data being changed while a used is already modifying it.
Thanks & Best Regards,
Shakti Barath -
Functional module amount_string_convert
hi to all
plz help me in this issue
i am using this function module for decimal seperator it is working fine for EUR currency but when other currencies like NL,ISK etc comes it is raising an exeption 203 .plz help me in in sloving this issue
hi sailatha this is the code
IF L_CURR EQ 'EUR'.
CALL FUNCTION 'AMOUNT_STRING_CONVERT'
EXPORTING
AMOUNT_STRING = AMOUNT
DCPFM = '2'
MLLN = 'M'
TSND = 'T'
WAERS = L_CURR
IMPORTING
AMOUNT = L_VALUE.
EXCEPTIONS
INVALID_TYPE = 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.
ELSE.
END OF INSERTION BY NTT 13-07-2006
CALL FUNCTION 'AMOUNT_STRING_CONVERT'
EXPORTING
AMOUNT_STRING = AMOUNT
DCPFM = '0'
MLLN = 'M'
TSND = 'T'
WAERS = CURR
IMPORTING
AMOUNT = L_VALUE.
EXCEPTIONS
INVALID_TYPE = 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.
ENDIF.
Thanks & Regards
Kiran kumar
Message was edited by: kiran kumarcheck this function module( i copied from one of the SDN post, but doesnt remember the link)
REPORT YTEST no standard page heading .
data : tline like tline occurs 0 with header line,
SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
data amouno type p DECIMALS 5 value '5455555.65461'.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = amouno
CURRENCY = 'USD'
FILLER = ' '
LANGUAGE = SY-LANGU
IMPORTING
IN_WORDS = SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3
WRITE : / 'Amount in Number: ',AMOUNO.
WRITE : / 'Amount in Word: ',SPELL-WORD, 'AND DECIMALS' , SPELL-DECWORD.
Result
Amount in Number: 5,455,555.65461
Amount in Word:
FIVE BILLIONS FOUR HUNDRED FIFTY-FIVE MILLION FIVE HUNDRED FIFTY-FIVE THOUSAND SIX HUNDRED FIFTY-FOUR
AND DECIMALS SIXTY-ONE
regards
srikanth
Message was edited by: Srikanth Kidambi -
Regarding Function Module for Locking ( enque)
Hi,
I am facing a Problem that is when iam running Call transaction one popup is coming because some other user currently editing that Tcode at that time i need to lock tcode using enque specially for table . If suppose some other user editing at that time it will shoe that popup and it will exit from their with out doing any other process For that i need Function module for Lock and Delock.
thanks in advance,
murali krishna.So in this example, I am doing a loop and check for a lock, if I don't get one, I wait for 5 seconds, this loop continues untill 30 seconds, no lock then it quits and gives message.
report zrich_0001.
data: counter type i.
parameters: p_equnr type equi-equnr.
start-of-selection.
clear counter.
do.
Exhausted, no luch in getting a lock, get of of DO loop.
if counter > 6.
sy-subrc = 1.
exit.
endif.
Try for lock
call function 'ENQUEUE_EIEQUI'
exporting
mode_equi = 'E'
mandt = sy-mandt
equnr = p_equnr
_wait = 'X'
exceptions
foreign_lock = 1
system_failure = 2
others = 3.
Got a lock, get out of DO loop.
if sy-subrc = 0.
exit.
endif.
Still here? Then wait another 5 seconds
wait up to 5 seconds.
counter = counter + 1.
enddo.
Report status
case sy-subrc.
when 0.
message s001(00) with 'Lock could not be established'.
when 1.
message i001(00) with 'Lock could not be established'.
endcase.
Regards,
rewards point -
Hello,
Is it possible to lock a function module similar to that of locking a table.
Please let me know.
Thanks in advance.
Regards,
Siva.u can set locks for function modules also. check the below links for better understanding..
help.sap.com/saphelp_nw04s/helpdata/en/cf/21eebf446011d189700000e8322d00/content.htm
help.sap.com/saphelp_nw04s/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm
Function Modules for Lock Requests
Activating a lock object in the ABAP Dictionary automatically creates function modules for setting (ENQUEUE_
DDENQ_LIKE-XPARFLAG
_WAIT
DDENQ_LIKE-WAITFLAG
_SCOPE
DDENQ_LIKE-SCOPE
_SYNCHRON
DDENQ_LIKE-SYNCHRON
Message was edited by:
Ramesh Babu Chirumamilla -
How to lock transaction using function module or something like that
Hi, all
I'd like to know the way to lock transacitons using function module or something like that.
I know this would be possible if calling transaciton SM01, but I want to know other ways like calling function module (BAPI ) or method.
Thank you for your cooperation In advance.
Regards,
Hideki KozaiHi,
Try the following FM
BRF_NETWORK_GRAPHICS BRF: Network Graphics for BRF Objects
BRF_INITIALIZE_GRAPHICS_NGR BRF: Initialize Network Graphics
BRF_NETWORK_GRAPHICS_NGR BRF: Network Graphics: Start
BUSG SAP Business Graphics
GRAPH_2D Calling up the 2D business graphics
GRAPH_2D_MENUE DO NOT USE (use 'GRAPH_2D' and 'GRAPH_BUSG_MENU_SET')
GRAPH_3D Calling up the 3D presentation graphics
GRAPH_BUSG_COLOR_SET Definition of color pallets for business graphics
GRAPH_BUSG_MENU_SET Pushbutton menu (tool bar) for all BUSG modules
GRAPH_MATRIX Calling up SAP Business Graphics (2D, 3D and 4D)
GRAPH_MATRIX_2D Calling up the 2D graphics (user-friendly version)
GRAPH_MATRIX_3D Structure of 3D graphics (user-friendly version)
GRAPH_MATRIX_4D Calling up a 3D graphic (4th dimension stacked representation)
Regards, -
Client copy Locked function module
HI,
I'm trying to make a client from client 400 to 420.
The problem is that the function module is locked by the current user (the same running the client copy); Then when It can't deletes the FM it states that it already exists:
"G_GLDB_POSTING_A already exists (include LGIVAU01)"
Afterwards the job gets cancelled due to a system exception ERROR_MESSAGE
The weird part is that it just happens for this client 420. There is also a copy from 400 to 410 and it works without a problem.
Any help would be greatly appreciated.Hi,
You can check the client copy lock from SCC4 also, but it really matters if your client copy finished or not.
If you still see the client copy lock there then it seems your client copy is not finished properly. Try to login your new client 420 and start deletion using SCC5 and after that you can start/schedule new client copy during weekends.
Regards,
Manish -
Function Module to Lock a Variant or see variant values in Disabled mode?
Hi,
I have a requirement in which I create some jobs which takes some variant as one of the input.
My Problem is once i have executed the job successfully in SM37, I need to see the variant values. I know there is a function Module RS_VARIANT_CHANGE with which we can see the values of variant.
But i dont want the user to modify those values since the job has already been executed. I just want to see them.
Can anyone tell me is there any FM to see just the variant values in disabled mode or the the variant is locked so that the user cant modify it?Hi,
I'm not sure if you really want to create a program to see the variant values?
Because you can see the values by simply going to SM37, select the job, display list of steps, position cursor and use menu Goto -> Variant
Moreover, (I don't know if it may answer your requirement) when you schedule a job with a report which outputs an ABAP list, you may define in the print parameters the option "Selection cover sheet" to print the values of selection screen parameters/select-options.
Sandra -
Function module to hold and release lock on MARD table entry
Hi Gurus,
Can you please tell me Function module to HOLD lock on MARD table and the Function Module to release lock on MARD table entry.
Thanks and Regards,
SudiptoLook via SE11 lock objects, use F4 for tables MAR*, the best for your request is on MARC table with object EMMARCS, so use FM ENQUEUE_EMMARCS and DEQUEUE_EMMARCS.
Regards,
Raymond -
Hi experts..
i got one requirement like i need to edit some rows particularly in alv....
Edit in alv output....is it possible to get that .....using normal function module with out using oops concept...
could any one pls help me...Hi Pendurti ,
If you want a particular field to be editable , simply define the fieldcatalog as
wa_fieldcatalog-edit = 'X'.
wa_fieldcatalog-input = 'X'.
for that field.
and
Now when you use FM ' Reuse alv grid display '
define USER_COMMAND
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = int_fieldcatalog
is_layout = wa_layout
TABLES
t_outtab = t_disp.
and now in form USER_COMMAND ; code as per following
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref1.
CALL METHOD ref1->check_changed_data.
endform.
Regards,
Yogendra Bhaskar -
Function Module to edit ABAP coding
Hi Gurus,
Can anyone tell me if there is any standard function module to go into the code and change some code dynamically in abap Editor.
There is some text needs to be changed in source code, which occurs huge number of times.
Manually to do it is difficult. This activity needs to be done in many programs.
Hope I am clear.
Thanks,
Prasad
Edited by: Julius Bussche on Feb 5, 2009 10:58 AM
Use meaningfull subject titlesHi Prasad,
Use function module
RS_TOOL_ACCESS
Parameters to use
OPERATION EDIT
OBJECT_NAME ZRR_TEST_02
OBJECT_TYPE PROG
As Julius pointed out close your threads which are resolved
Regards -
Is there any function module to lock t024 table
is there lock object for t024 table?otherwise any fm for locking t024 table?
Hi Naren,
<b>Good ... check out the following documentation
Lock objects are used to lock the database table while making the modifications on the database table.
you can create your own lock objects using SE11.
if you create lock objects on any table system will create two function modules.
1.ENQUEUE....
2.DEQUEUE.....
first one is used to lock the table
second one used to removing lock on the table.
lock Table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = table_name
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
Unlock Table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
tabname = table_name
check this link :
http://help.sap.com/saphelp_40b/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
_SCOPE = 1: The lock is not sent to the update program. The lock is removed when the transaction is ended.
_SCOPE = 2: The lock is sent to the update program. The update program is responsible for removing the lock. The dialog program which requested the lock no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module.
_SCOPE = 3: The lock
Re: lock objects
Managingin lock entries
http://help.sap.com/saphelp_nw04/helpdata/en/37/a2e3ae344411d3acb00000e83539c3/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/cb/168237d30d974be10000009b38f8cf/frameset.htm</b>
Good Luck and thanks
AK -
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.
Maybe you are looking for
-
Can I install Windows on my iMac 27, 3TB Fusion Drive, late-2012 with Boot Camp 5?
Hello. When I first opened the Boot Camp Assistant app, it said it could not work with the 3TB fusion drive. With the updated version of Boot Camp, the option to install Windows appeared. I tried to install Windows 8, but the loading bar stopped movi
-
Prob in transferring the chinese texts from the text file (UTF-8) into SAP
Hello SAP Experts , We are using 4.6 C version I created a ABAP to upload Chinese Chars from a text file to SAP Database. The coding that I use to read the text file is showed as following: CALL FUNCTION 'WS_UPLOAD' EXPORTING CODEP
-
When Internet Explorer 8 will be supported for BOE?
There seems to be very little info on Internet Explorer 8 for BOE on Support Portal. Anyone aware of any timeframes?
-
Rp-pppoe 3.7: can't connect anymore
hi, I just updated rp-pppoe from 3.5 to 3.7, but now I can't go online with arch anymore and have to use windows /etc/ppp/pppoe.conf was moved to /etc/ppp/pppoe.conf.pacsave. I tried to run adsl-setup again for the new files, but adsl-setup is gone.
-
If/then JavaScript help needed
Hello, I am trying to write a script for a fillable PDF in Adobe Acrobat, but I don't have much experience with JavaScript and I need some help! Basically I have five fields as follows: A1 = a checkbox B1 = a field with a number value in it C1 = a fi