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 R
Hi,
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.
Similar Messages
-
How to delete lock entries generated by the function module "BAPI_OBJCL_CHANGE"
Hi experts,
I'm now trying to make an add-on program
which updates material master information by the background job.
To update the "Classification" view of material master,
the program calls the function module "BAPI_OBJCL_CHANGE".
If the "RETURN" information is valid,
then the program calls "BAPI_TRANSACTION_COMMIT" (with the "wait" parameter 'X').
Contrary to my intention,
lock entries generated by the function module "BAPI_OBJCL_CHANGE" remains after "BAPI_TRANSACTION_COMMIT".
As a result, the material updated remains locked until the add-on processing ends.
To shoot this trouble, I read some SCN discussions below:
<<lock unlock record>>
⇒ As I wrote above, I checked the parameter for "BAPI_TRANSACTION_COMMIT".
<<BAPI_OBJCL_CHANGE Lock Error !>>
⇒ I cannot call the function module "BAPI_OBJCL_CHANGE" with "IN UPDATE TASK" option
because of "BAPI_OBJCL_CHANGE" attributes.
("BAPI_OBJCL_CHANGE" is not a "Update Module".)
How can I delete lock entries generated by the function module "BAPI_OBJCL_CHANGE" ?
Thanks in advance.
TomI quess/hope you want to remove locks in you caller program and not locks required by the update task processing to insure database consistencies...
Did you use the WAIT option in the commit FM, else if there are no other locks in your called program a call of FM DEQUEUE_ALL could solve your problem.
Regards,
Raymond -
Add entries to database tables using update function module
Hi All,
I have a small requirement, in which I need to update Z-tables usimg update function module in update task. In the calling program, I have gathered the data in a field symbol value of type any. I need to pass the same to that function module to update the data which is in the field symbol.
Please guide me how to achieve this technically.
Thanks in advance,
Pradipta .Hi,
I believe you already have evrything with you.....Start Coding the same and come back with any Coding issue.
I believe you will not be able to pass the Field Symbol in FM Interface.....You need to pass the Variable which Field Symbol is referring.... -
Update sap table using a function module call by php code
Hello,
I m trying to update the table VBAP using a function module ZZ_SET_DISTANCE call by a php code.
But I have this problem:
the saprfc seems to work well but when I look to the table VBAP the fields have not been update.
I tried the function module in debug mode and it work good. The fields are update.
I also handle the saprfc call function and the return SAPRFC_OK
This are the function module ZZ_SET_DISTANCE, and the php code
//PHP CODE
$fce = saprfc_function_discover($sap,"ZZ_SET_DISTANCE");
if (! $fce ) {echo "Echec d'ouverture du module fonction "; exit;}
saprfc_import ($fce,"COMMANDE", '0000001998');
saprfc_table_init($fce,"TBLE_CMDE");
$val=array();
$val['NUM_POST']='000030';
$val['HN_EXP']='';
$val['ST_EXP']='';
$val['PC_EXP']='';
$val['CI_EXP']='';
$val['CO_EXP']='';
$val['HN_REC']='';
$val['ST_REC']='';
$val['PC_REC']='';
$val['CI_REC']='';
$val['CO_REC']='';
$val['DIST']='popo';
saprfc_table_append ($fce,"TBLE_CMDE", $val);
$rfc_rc = saprfc_call_and_receive ($fce);
echo "\n".$rfc_rc;
if ($rfc_rc != SAPRFC_OK) { if ($sap == SAPRFC_EXCEPTION ) echo ("Exception raised: ".saprfc_exception($fce)); else echo (saprfc_error($fce)); }else{echo '/execution de la function ;}
saprfc_function_free($fce);
//FUNCTION MODULE ZZ_SET_DISTANCE
FUNCTION ZZ_SET_DISTANCE.
""Local Interface:
*" IMPORTING
*" VALUE(COMMANDE) TYPE VBELN
*" TABLES
*" TBLE_CMDE STRUCTURE ZADD_COM_LOXAN
DATA : NUMC TYPE VBELN.
NUMC = COMMANDE .
WHILE STRLEN( NUMC ) < 10 .
CONCATENATE '0' NUMC INTO NUMC .
ENDWHILE .
DATA tble_addrcomm LIKE LINE OF TBLE_CMDE .
LOOP AT TBLE_CMDE INTO tble_addrcomm.
DATA : NUMP TYPE POSNR.
NUMP = tble_addrcomm-NUM_POST.
WHILE STRLEN( NUMP ) < 6 .
CONCATENATE '0' NUMP INTO NUMP .
ENDWHILE .
UPDATE VBAP SET ARKTX = tble_addrcomm-DIST
WHERE VBELN EQ COMMANDE
AND POSNR EQ NUMP.
ENDLOOP.
ENDFUNCTION.
Is anybody can help me?
thank.Marie, create a Blog please, about more details for dummies....
1) how to connect to sap system?
2) you run the php code where? in a webserver or where?
3) wich is the url for run the FM: ZZ_SET_DISTANCE
4) you placed some dlls files on the web server?
please is interesting this...
Thanks -
Hi,
As I am programming ABAP for the first time I have a question which I think is pretty basic.
I have created a function module Z_POPUP_GET_VALUES which calls the function POPUP_GET_VALUES. I got some sample code from another forum post and it defines a table name and fieldname. But I am not sure what this table is suppose to be (or do)? Is it an ABAP dictionary table? If so, how do I create one based on the characteristic I want to display??
The implemented code is as follows:
DATA: i_sval Like sval occurs 1 with Header Line.
data: v_subrc like sy-subrc.
i_sval-tabname =
i_sval-fieldname = '?????'.i_sval-fieldtext = 'Eiendelsområde'.
i_sval-field_obl = 'X'.
append i_sval.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
NO_VALUE_CHECK = ' '
POPUP_TITLE = 'Asset Area'
START_COLUMN = '5'
START_ROW = '5'
IMPORTING
RETURNCODE = v_subrc
TABLES
FIELDS = i_sval
EXCEPTIONS
ERROR_IN_FIELDS = 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.
All help appreciated!
Best regards,
TMHi,
Tables in function modules are parameter to that function module.
That can be processed when the function module code is called.
and the result can be stored in the tables.
Tables have a structure like ABAP Dictionary structure .ie. You will be
define the table type as a dictionary table.
Regards,
<b>Ramganesan K</b> -
How to use BAPI_MATERIAL_AVAILABILITY Function Module....
Hi Experts,
I want to know actual free available quantity (ATP Qty.) for mass materials,
How to use BAPI_MATERIAL_AVAILABILITY function module ?
I have select all material from MARA and inserted in itab.
LOOP AT ITAB.
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
PLANT =
MATERIAL =
UNIT =
CHECK_RULE =
STGE_LOC =
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
DEC_FOR_ROUNDING =
DEC_FOR_ROUNDING_X =
READ_ATP_LOCK =
READ_ATP_LOCK_X =
IMPORTING
ENDLEADTME =
AV_QTY_PLT =
DIALOGFLAG =
RETURN =
TABLES
WMDVSX =
WMDVEX =
I dont know how to use it.
pl. guide us.
YusufHi,
data: iwmdvsx type table of bapiwmdvs with header line,
iwmdvex type table of bapiwmdve with header line.
parameters: p_matnr type mara-matnr,
p_werks type marc-werks,
p_meins type mara-meins.
call function 'BAPI_MATERIAL_AVAILABILITY'
exporting
plant = p_werks
material = p_matnr
unit = p_meins
CHECK_RULE =
STGE_LOC =
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
IMPORTING
ENDLEADTME =
AV_QTY_PLT =
DIALOGFLAG =
RETURN =
tables
wmdvsx = iwmdvsx
wmdvex = iwmdvex.
check sy-subrc = 0.
Text
ATP information
Functionality
Using this function module, you can determine the receipt quantity still available for a particular material in a certain plant according to ATP logic (MRPII).
The availability check is carried out on transferring the material number, the plant and the input table (WMDVSX). The scope of the check, that is, which stocks, receipts and issues are to be included in the check is defined by the combination of checking group (material master) and cheking rule. In the function module, the system uses the checking rule defined in Sales & Distribution (A). You can overrule this checking rule by using an interface or a user-exit (exit_saplw61v_001). A similar procedure is also valid for the plant parameters. The customer number in the user-exit means that the plant selection can be controlled via the customer. If no plant parameters are given via the interface, the system uses the parameter 'WRK' saved in the user's fixed values.
The results of the availability check are recorded in the output table (WMDVEX). This table contains dates and available receipt quantities (ATP quantities). The results of the check depends on the following entries:
If no date and no quantity is transferred, the system displays the ATP situation from today's date into the future as the result.
If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:
' ' (blank) <=> quantity completely available
'X' <=> only partial quantity available or not available at
all
'N' <=> Material not included in the availability check
(Material not relevant to the availability check)
The system also displays the end of the replenishment lead time (ENDLEADTME).
regards -
USE OF FUNCTION MODULE 'REUSE_ALV_FIELDCATALOG_MERGE'
HI all ,
Please help me with this function module :
<b>'REUSE_ALV_FIELDCATALOG_MERGE'</b>
How to use this function module ?The function REUSE_ALV_FIELDCATALOG_MERGE is used for retrieve a catalog from a table defined in DDICT. Then you can modify it as you want. You can see an example in BALV* programs demos.
Example:
in the program J_1AINFG is called as:
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE' =20
EXPORTING =20
i_internal_tabname =3D TABLEINT
i_structure_name =3D 'J_1AIFALVHDR' =20
CHANGING =20
ct_fieldcat =3D i_fieldcat[]. =20
where i_structure name is defined in DDICT. Then you can add, delete, or modify masks, lengths, etc. properties of fields in this table.
In a program if u need to add lot of fields
LOOP AT i_fieldcat INTO wa_fieldcat. =20
MOVE wa_fieldcat TO wa_auxfieldcat. =20
CASE wa_fieldcat-col_pos. =20
WHEN 27. =20
CLEAR wa_fieldcat. =20
wa_fieldcat-fieldname =3D 'COEFIC1'. =20
wa_fieldcat-tabname =3D g_tabname_header. =20
wa_fieldcat-col_pos =3D 27. =20
wa_fieldcat-seltext_s =3D 'Coef.Per.'. =20
wa_fieldcat-seltext_m =3D 'Coefic.Per=EDodo'. =20
wa_fieldcat-seltext_l =3D 'Coeficiente del Per=EDodo'. =20
wa_fieldcat-outputlen =3D 9. =20
wa_fieldcat-just =3D 'R'. =20
APPEND wa_fieldcat TO auxcatalogo. =20
ADD 1 TO wa_auxfieldcat-col_pos. =20
ENDCASE.
ENDLOOP.
i_fieldcat[] =3D auxcatalogo[]. -
How to use read_text function module
Hi how to use read_text function module to read purchase order header text .what are all tht things to pass in ID,Name and Object
thanks,
MaheDear,
Use below code.
DATA:IT_LINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
V_TDNAME LIKE THEAD-TDNAME.
V_TDNAME = PO_NUMBER.
CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
ID = 'F01'
LANGUAGE = 'EN'
NAME = V_TDNAME
OBJECT = 'EKKO'
TABLES
LINES = IT_LINE.
Thanks and Regards, -
How can i use reuse_alv_fieldcatalog_merge function module
I am using below steps for populating the final internal table.How can I use reuse_alv_fieldcatalog_merge function module in the place of declaring all these fields.How canI put title of the report in reuse_alv_fieldcatalog_merge function module.
FORM BUILD_FIELDCATALOG .
FIELDCAT-TABNAME = 'IT_FINAL'.
FIELDCAT-FIELDNAME = 'KUNNR'.
FIELDCAT-SELTEXT_M = 'Customer Name'.
FIELDCAT-JUST = 'L'.
FIELDCAT-KEY = 'X'.
FIELDCAT-DATATYPE = 'C'.
APPEND FIELDCAT TO I_FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-TABNAME = 'IT_FINAL'.
FIELDCAT-FIELDNAME = 'VBELN'.
FIELDCAT-SELTEXT_M = 'Invoice Reference'.
FIELDCAT-JUST = 'L'.
FIELDCAT-KEY = 'X'.
APPEND FIELDCAT TO I_FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-TABNAME = 'IT_FINAL'.
FIELDCAT-FIELDNAME = 'VKBUR'.
FIELDCAT-SELTEXT_M = 'Sales Office'.
FIELDCAT-JUST = 'L'.
FIELDCAT-KEY = 'X'.
FIELDCAT-DATATYPE = 'C'.
APPEND FIELDCAT TO I_FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-TABNAME = 'IT_FINAL'.
FIELDCAT-FIELDNAME = 'VKGRP'.
FIELDCAT-SELTEXT_M = 'Sales Person'.
FIELDCAT-JUST = 'L'.
FIELDCAT-KEY = 'X'.
FIELDCAT-DATATYPE = 'C'.
APPEND FIELDCAT TO I_FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-TABNAME = 'IT_FINAL'.
FIELDCAT-FIELDNAME = 'POSNR'.
FIELDCAT-SELTEXT_M = 'Item No'.
FIELDCAT-JUST = 'L'.
FIELDCAT-KEY = 'X'.
APPEND FIELDCAT TO I_FIELDCAT.
CLEAR FIELDCAT.
FIELDCAT-TABNAME = 'IT_FIANL'.
FIELDCAT-FIELDNAME = 'ARKTX'.
FIELDCAT-SELTEXT_M = 'Item Description'.
FIELDCAT-JUST = 'L'.
FIELDCAT-DATATYPE = 'C'.
APPEND FIELDCAT TO I_FIELDCAT.
CLEAR FIELDCAT.Hello,
It is very easy to use reuse_alv_fieldcatalog_merge.
You try this it will work.
example
data:
DATA : gv_repid TYPE syrepid VALUE sy-repid . " Report id
PERFORM set_field_catalog USING gst_struct CHANGING lst_fieldcat.
FORM set_field_catalog USING uv_tab TYPE slis_tabname
CHANGING xt_fieldcatalog TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = gv_repid
i_internal_tabname = uv_tab
i_inclname = gv_repid
CHANGING
ct_fieldcat = xt_fieldcatalog
EXCEPTIONS
inconsistent_interface = 1
program_error = 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.
ENDFORM. " set_field_catalog_spec -
How to keep long text in bdc using create_text function module
hi,
ihave bdc in that i having field like long text i have to upload the long text using create_text function module how to use and where to use in bdc. wat parameters i have to pass exactly.
i need some other information like how can i pass this to BDC i got like this .
can u plz check it.
its a length of 255 chaters
perform bdc_field using 'RSTXT-TXLINE(02)'
'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
& 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'.
perform bdc_field using 'RSTXT-TXLINE(03)'
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
& 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.
perform bdc_field using 'RSTXT-TXLINE(04)'
'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'
& 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'.
perform bdc_field using 'RSTXT-TXLINE(05)'
'hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh'
& 'hhhhhhhhhhhhhhhhhhhhhh'.Hi,
Use this coding where do u want,
data: begin of textline occurs 10.
include structure tline.
data: end of textline.
start-of-selection.
textline-tdformat = '*'.
textline-tdline = 'TESTING FOR CREATION OF TEXT'.
append textline.
clear textline.
call function 'CREATE_TEXT'
exporting
fid = '0013'
flanguage = sy-langu
fname = '0095000501'
fobject = 'VBBK'
tables
flines = textline
exceptions
no_init = 01
no_save = 02.
end-of-selection. -
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 -
Issue with use of Function Module GUI_UPLOAD
Hi Experts,
I have an issue in using the Function Module GUI_UPLOAD for uploading the contents of an Excel file on the Presentation Server to an internal table in an ABAP Program.
My file consists of around 300 records but the FM succeeds in uploading only the first 6 lines to the Internal Table specified while calling the FM.
I dont have any idea why this happens. Any pointers in this direction will be helpful.
Thanks in advance.
Regards,
KeerthiHi,
Kindly go through this link below:
https://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=60655105
Hope it helps you
Regards
Mansi -
How can i use this function module
Hai
How can i use this function module /SAPHT/SALES_ORDER_READ, already apply the some parameters in this function module, but it shows the error , please tell me, how to declare the parameters in this function module ,
thanks
neelimaHi
For a particular sales order,you have to pass the order number and the item number in the sales order.
It will display the rest of the values which u can capture them using internal tables.
Regards,
Vishwa. -
URGENT ---- How to use BAPI_REQUIREMENT_CHANGE Function Module
I want to change the Materail requirements through Txn MD62.
Instead i am using BAPI_REQUIREMENTS_GETDETAILS Function Module.
Using this I should use BAPI_REQUIREMENT_CHANGE Function Module.
But the requirements are not getting changed.what kind of messages u are gettiing into the table RETURN ? u have to cross check this internal table .
flow will be like this
call ' BAPI'
if return[] is initial.
commit work.
else.
do nothing.
endif.
Regards
Peram -
How to use BAPI_WARRANTYCLAIM_CHANGE2 function module
i am unable to pass values to table parameter.
for above i have used WTY12_CLAIM_READ function module and i have give only cliam number as input and tried retriving other parameters(tables)
from these i passed same table parameters to BAPI_WARRANTYCLAIM_CHANGE2 function module but unable to run it in se37.
please just me any logic or solution to this.
i am getting repeated error as :
1)item types
2)pricing
3)partner
if any one can send me a sample code to how to use these bapi .
thanks,
lokeshHi Lokesh,
I believe you are using the FM WTY12_CLAIM_READ_RFC to retrieve the claims related information by just passing Claim Number, and you are not getting any data back from the function module in the table parameters and you won't get any values as well, as there is no code in that function module.
Thanks,
Mahesh.
Maybe you are looking for
-
The left right arrow toggle button works only so far going to the right, then the sidebar separates and doesn't expand any further. Any ideas how to get the toggle button to stay connected to both sidebar and main window??
-
Server Running mac osx 10.4 Server Admin does not reflect recent changes made within WGM in relation to Mail quota increases. I have rebooted, refreshed mail system etc but the mail quota appearing in mail accounts is incorrect. Please advise the bes
-
Planner table changes transport in SPRO
Hi all, I have created a new planner in SPRO and using menu 'Table View'->Transport, I have saved the changes of the planner table under one request number, but I dont see any info under this in se10. Is this right approach or else I missed anything?
-
Error when installing 0vendor from the Business Content in BW
Hi, We installed 0vendor 4 years ago, but never use it. Now I have a requirement to bring vendor master data from FICO. In the custom active A version 0vendor, the 0bpartner is a navigation attribute. In 0bpartner, 0legalform is display attribute. Bu
-
Benefits and utilization of ST-ETP addon in Test Management
Hi Experts, We have installed ST-ETP addon in our Solman. Kindly describe the benefits which we can derive in the Test Management and also how to go about it. Reg, Ashok Singh