How to handle lock object in BDC call transcation method?
Hi,
how to handle lock object in BDC call transcation method?
Thanks In advances.
If you are updating Z-fields then you need to create a lock entry, before you use call transaction.
After creating lock object, please use FM Enqueue_<lockname> before CALL transaction and FM Dequeue_<lockname> after you have commited your data.
Thanks,
Kartavya
Similar Messages
-
How can we update mk01 with BDC call transaction method
can any one send the sample code for upload of MK01 using call transaction method.
its urgent..Use the following code.
*& Report ZMK01_VA01 *
REPORT Z_MK01 .
SOURCE INTERNAL TABLE
DATA: BEGIN OF T_SOURCE OCCURS 0,
LIFNR TYPE LIFNR,
EKORG TYPE EKORG,
KTOKK TYPE KTOKK,
NAME1 TYPE NAME1,
SORTL TYPE SORTL,
LAND1 TYPE LAND1,
WAERS TYPE WAERS,
END OF T_SOURCE.
*DATA: E_MESSAGE TYPE C.
ERROR MESSAGE TABLE
DATA: T_ERRORMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
TARGET TABLE LIKE BDCDATA
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
TO UPLOAD DATA FROM LEGACY SYSTEM
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'D:\MK01.TXT'
FILETYPE = 'DAT'
IMPORTING
FILELENGTH =
TABLES
data_tab = T_SOURCE
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
NO_AUTHORITY = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
TRANSFERING DATA FROM INTERNAL SOURCE TABLE TO TARGET TABLE
LOOP AT T_SOURCE.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPMF02K' '0107'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
T_SOURCE-LIFNR.
perform bdc_field using 'RF02K-EKORG'
T_SOURCE-EKORG.
perform bdc_field using 'RF02K-KTOKK'
T_SOURCE-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-LAND1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-NAME1'
T_SOURCE-NAME1.
perform bdc_field using 'LFA1-SORTL'
T_SOURCE-SORTL.
perform bdc_field using 'LFA1-LAND1'
T_SOURCE-LAND1.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFM1-WAERS'
T_SOURCE-WAERS.
perform bdc_dynpro using 'SAPMF02K' '0320'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'MK01' USING BDCDATA MODE 'A' MESSAGES INTO T_ERRORMSG.
ENDLOOP.
LOOP AT T_ERRORMSG.
WRITE:/ 'MESSAGE TYPE',T_ERRORMSG-MSGTYP,
'FIELDNAME WERE ERROR OCCURED', T_ERRORMSG-FLDNAME.
*CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = T_ERRORMSG-MSGID
LANG = SY-LANGU
NO = T_ERRORMSG-MSGNR
V1 = T_ERRORMSG-MSGV1
V2 = T_ERRORMSG-MSGV2
V3 = T_ERRORMSG-MSGV3
V4 = T_ERRORMSG-MSGV4
IMPORTING
MSG = E_MESSAGE
EXCEPTIONS
NOT_FOUND = 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.
*WRITE:/ E_MESSAGE.
ENDLOOP.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> SPACE.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
With Regards
K Srinivas -
HOW TO HANDLE MULTIPLE VALUES IN BDC FOR A PARTICULAR FIELD.
I THINK IT IS HANDLING OF TABLE CONTROLS IN BDC
PLEASE LET KNOW WHETHER THESE TWO ARE SAME CONCEPT OR NOT
HOW TO HANDLE TABLE CONTROLS IN BDC
Moderator message - Please do not use all caps. Please do not ask interview questions - post locked
Edited by: Rob Burbank on Jun 26, 2009 10:02 AMHi,
To handle table control in BDC you will have to enter at least one record in the table control and there after use the index number to increment to the next line item.
Say you run a recording for a transaction which has a table control (ME21), here after you have completed the recording, you'll see the code which will have sometjing like <fieldname>(01) and the entered value. that valeu has been entered as the first line item (01 being the index).
You will have to replace the hard coded line item index with a variable and inside a loop increment the item index. Once you reach the maximum allowed line items on your screen juct press the pagedown button (or insert new row) and reset the index to 1.
Following is a code snippet I used while uploading data for ME31K (vendor contract). It is not the complete code but does show how your code needs to be changed with using index for line items.
Here we assumne that the maximun number of lines displayed at a time on the screen is 14.
<< Unformatable code removed >>
Hope this helps.
Regards,
Sachin
Edited by: Rob Burbank on Jun 26, 2009 10:03 AM -
How to handle Table control in BDC? Difference between BDC & LSMW?
Hi
How to handle Table control in BDC? Difference between BDC & LSMW?
Regards,
RaghuHi ,
the diff b/w normal BDC and with table control is that with table control u can enter as many lineitems as u want..so during recording if u r entering 3 line items..then the program will show (1), (2) and (3) with that.
chane that fixed no to variable.
check that sample code.
in this for new customer...any no of items can be entered.
LOOP AT t_cusdata.
REFRESH t_bdcdata.
ON CHANGE OF t_cusdata-kunnr.
initial screen.
PERFORM bdc_dynpro USING 'SAPMV10A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MV10A-VTWEG'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MV10A-KUNNR'
t_cusdata-kunnr.
PERFORM bdc_field USING 'MV10A-VKORG'
t_cusdata-vkorg. "'HCL'.
PERFORM bdc_field USING 'MV10A-VTWEG'
t_cusdata-vtweg. "'HL'.
DATA: fnam(20) TYPE c,
fnam1(20) TYPE c,
idx(2) TYPE c.
MOVE 1 TO idx.
LOOP AT t_matdata WHERE kunnr = t_cusdata-kunnr.
PERFORM bdc_dynpro USING 'SAPMV10A' '0200'.
CONCATENATE 'MV10A-KDMAT(' idx ')' INTO fnam.
PERFORM bdc_field USING 'BDC_CURSOR'
fnam.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
CONCATENATE 'MV10A-MATNR(' idx ')' INTO fnam1.
PERFORM bdc_field USING fnam1
t_matdata-matnr. "'FIN50'.
PERFORM bdc_field USING fnam
t_matdata-kdmat. "'ABCD'.
idx = idx + 1.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMV10A' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MV10A-MATNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
CALL TRANSACTION 'VD51' USING t_bdcdata MODE 'A' .
UPDATE 'S' MESSAGES INTO t_err_mes.
Regards,
Sonika -
How to handle currency & unit fields in call transaction?
Hi,
Can any one tell me How to handle currency & unit fields in call transaction? & how to dael with error for this fields? whith some sort of coding.
Thanks In Advance.
PravinHi Pravin,
The same topic has been discussed in the following thread:
How to handle currency & unit fields in BDC recording method?
Regards,
Chandra Sekhar -
Hi abapers how to handle table control in bdc
hi experts please guide me
how to handle table control in bdc? could u please explain me briefly
thanks and regardssayeed,
Go thru this code it may help you. check bold code for the table control..
report zsunil_bdc
no standard page heading line-size 255.
INTERNAL TABLES *
DATA: BEGIN OF IT_KNA1 OCCURS 0,
CUSTOMER LIKE RF02D-KUNNR,
COMPANY_CODE LIKE RF02D-BUKRS,
ACCOUNT_GROUP LIKE RF02D-KTOKD,
TITLE LIKE KNA1-ANRED,
NAME LIKE KNA1-NAME1,
SEARCH_TERM LIKE KNA1-SORTL,
STREET LIKE KNA1-STRAS,
CITY LIKE KNA1-ORT01,
POSTAL_CODE LIKE KNA1-PSTLZ,
COUNTRY LIKE KNA1-LAND1,
LANGUAGE_KEY LIKE KNA1-SPRAS,
CNTRY LIKE KNBK-BANKS,
BANK_KEY LIKE KNBK-BANKL,
BANK_ACCOUNT LIKE KNBK-BANKN,
REC_ACCOUNT LIKE KNB1-AKONT,
END OF IT_KNA1.
DATA: IT_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA: IT_MESSAGES TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER P_FILE TYPE RLGRAP-FILENAME DEFAULT 'C:\CUSTOMER.TXT'
OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM HELP_FILE USING P_FILE.
START OF SELECTION *
START-OF-SELECTION.
*UPLOADING THE FILE FROM WORKSTATION
PERFORM UPLOAD_FILE USING P_FILE.
*POPULATING DATA.
PERFORM POPULATE_FILE.
*& Form HELP_FILE
text
-->P_P_FILE text
form HELP_FILE using p_p_file.
DATA: L_FILE TYPE IBIPPARMS-PATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = L_FILE.
P_P_FILE = L_FILE.
endform. " HELP_FILE
*& Form UPLOAD_FILE
text
-->P_P_FILE text
form UPLOAD_FILE using p_p_file.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = 'P_P_FILE'
FILETYPE = 'DAT'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
TABLES
data_tab = IT_KNA1
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7.
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. " UPLOAD_FILE
*& Form POPULATE_FILE
text
--> p1 text
<-- p2 text
form POPULATE_FILE .
DATA: L_STRING TYPE STRING,
L_COUNTER(2) TYPE N,
V_INDEX TYPE SY-TABIX.
LOOP AT IT_KNA1.
V_INDEX = SY-TABIX.
AT NEW CUSTOMER.
READ TABLE IT_KNA1 INDEX V_INDEX.
IF SY-SUBRC = 0.
perform bdc_dynpro using 'SAPMF02D' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02D-KTOKD'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02D-KUNNR'
IT_KNA1-CUSTOMER.
perform bdc_field using 'RF02D-BUKRS'
IT_KNA1-COMPANY_CODE.
perform bdc_field using 'RF02D-KTOKD'
IT_KNA1-ACCOUNT_GROUP.
*PERFORM BDC_FIELD USING 'RF02D-D0130'
'X'.
perform bdc_dynpro using 'SAPMF02D' '0110'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-SPRAS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'KNA1-ANRED'
IT_KNA1-TITLE.
perform bdc_field using 'KNA1-NAME1'
IT_KNA1-NAME.
perform bdc_field using 'KNA1-SORTL'
IT_KNA1-SEARCH_TERM.
perform bdc_field using 'KNA1-STRAS'
IT_KNA1-STREET.
perform bdc_field using 'KNA1-ORT01'
IT_KNA1-CITY.
perform bdc_field using 'KNA1-PSTLZ'
IT_KNA1-POSTAL_CODE.
perform bdc_field using 'KNA1-LAND1'
IT_KNA1-COUNTRY.
perform bdc_field using 'KNA1-SPRAS'
IT_KNA1-LANGUAGE_KEY.
perform bdc_dynpro using 'SAPMF02D' '0120'.
perform bdc_field using 'BDC_CURSOR'
'KNA1-LIFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02D' '0130'.
PERFORM BDC_FIELD USING 'RF02D-D0130'
'X'.
perform bdc_field using 'BDC_CURSOR'
'KNBK-BANKN(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02D' '0210'.
perform bdc_field using 'BDC_CURSOR'
'KNB1-AKONT'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'KNB1-AKONT'
IT_KNA1-REC_ACCOUNT.
perform bdc_dynpro using 'SAPLRSFH' '0100'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'RSIODYNP4-LOW(01)'.
ENDIF.
ENDAT.
L_COUNTER = L_COUNTER + 1.
CLEAR L_STRING.
CONCATENATE 'KNBK-BANKS(' L_COUNTER ')' INTO L_STRING.
PERFORM BDC_FIELD USING L_STRING
IT_KNA1-CNTRY.
CLEAR L_STRING.
CONCATENATE 'KNBK-BANKL(' L_COUNTER ')' INTO L_STRING.
PERFORM BDC_FIELD USING L_STRING
IT_KNA1-BANK_KEY.
CLEAR L_STRING.
CONCATENATE 'KNBK-BANKN(' L_COUNTER ')' INTO L_STRING.
PERFORM BDC_FIELD USING L_STRING
IT_KNA1-BANK_ACCOUNT.
AT END OF CUSTOMER.
READ TABLE IT_KNA1 INDEX V_INDEX.
IF SY-SUBRC = 0.
CALL TRANSACTION 'FD01' USING IT_BDCDATA MODE 'A' UPDATE 'S' MESSAGES
INTO IT_MESSAGES.
IF SY-SUBRC <> 0.
PERFORM EMPLOYEEID_ERROR.
*ELSE.
ENDIF.
WRITE: SY-SUBRC.
perform message_format_write.
*ENDIF.
*WRITE: SY-SUBRC.
CLEAR IT_BDCDATA.
REFRESH IT_BDCDATA.
ENDIF.
ENDAT.
ENDLOOP.
endform. " POPULATE_FILE
*& Form bdc_dynpro
text
-->P_0224 text
-->P_0225 text
form bdc_dynpro using value(p_0224)
value(p_0225).
IT_BDCDATA-PROGRAM = P_0224.
IT_BDCDATA-DYNPRO = P_0225.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
CLEAR IT_BDCDATA.
endform. " bdc_dynpro
*& Form bdc_field
text
-->P_0229 text
-->P_0230 text
form bdc_field using value(p_0229)
value(p_0230).
IT_BDCDATA-FNAM = P_0229.
IT_BDCDATA-FVAL = P_0230.
APPEND IT_BDCDATA.
CLEAR IT_BDCDATA.
endform. " bdc_field
*& Form EMPLOYEEID_ERROR
text
--> p1 text
<-- p2 text
form EMPLOYEEID_ERROR .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = 'Z50583_REC1'
HOLDDATE = FILLER8
KEEP = 'X'
USER = SY-UNAME
RECORD = FILLER1
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11.
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 FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FD01'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
dynprotab = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7.
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 FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_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. " EMPLOYEEID_ERROR
*& Form message_format_write
text
--> p1 text
<-- p2 text
form message_format_write .
DATA: L_MSG(200).
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = SY-LANGU
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
WRITE: / L_MSG.
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. " message_format_write
~~Guduri -
How to handle screen resolution in bdc session method.
hi all,
how to handle screen resolution in bdc session method.Hello,
Why do need that for? Is it to add rows on a table control??
If it does, add new rows by using the add button instead of adding into the table control directly to each row.
Bye
Gabriel. -
How to handle table control in BDC while uploading item details for anorder
How to handle table control in BDC while uploading item details for an order?
What is the use of CTU_PARAMS structure in BDC?
In Finance I have done some changes to the layout set by coping to a zscript(duning letter) and how can assign the print program?
What is the process to test the finance script?
How can I see the print preview whether it is coming correctly or not?
Thanks in advance.
Regards.
Abhilash.hi,
for the bdc control refer the following link:
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
ctu_params:
refer to the link
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/dataTransfers-LSMW%2CALE%2C+BDC
reward if useful,
thanks and regards -
How to use lock object? what we lock either total ztable or only record?
Hi
How to use lock object? what we lock either total ztable or only particular record?
Don't tell create lock object on se11 with E letter & acll it in program with eENQUEUE & DEQUEUE.
just tell me we will lock only particular record or total ztable?
specify with example.
Thanks.Hi
Go to SE11, in the option 'Lock object' enter the name of your lock,
begin with 'E', suppose 'EXXXX' And create. In tab 'Tables' fill the
table name where the record you want to lock exist and select the
lock mode. Lock mode can be shared and exclusive. If 'shared',
when you lock the record, other can also read data, but can not
modify. If 'exclusive', when you lock the record, other can neither
read nor modify the record. After save and activate, you will get two
function module.'ENQUEUE_EXXXX' to lock record,
'DEQUEUE_EXXXX' to release lock on one record.
When use this function module it only lock one record at a time. It
does not lock the table. -
please help ... have new samsung ativ se windows 8 phone ... screen lock is on to require password, but on incoming calls its not locked ... how do i lock it for incoming calls too ???? thanks
Personal rant, why do people write the entire problem in topic line
It's not possible with Windows Phone 8. What's the point, a call is coming in and the phone allows you to answer. -
How to create lock object?
How to create lock object,- by going to se11 i have created but when i am going to sm12 to see wheather the table is locked or not then it is showing no entries found.
Please help me how to create Lock object and see wheather thetable is lock is locked or not.
Thnks in advanceHi venkateshwar,
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
https://forums.sdn.sap.com/click.jspa?searchID=115258&messageID=2656474
Do the following steps..
GO TO SE11
Select the radio button "Lock object"..
Give the name starts with EZ or EY..
Example: EYTEST
Press Create button..
Give the short description..
Example: Lock object for table ZTABLE..
In the tables tab..Give the table name..
Example: ZTABLE
Save and generate..
Your lock object is now created..You can see the LOCK MODULES..
In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
<b>Reward points if this helps.
Manish</b> -
How to handle Tree structure in bdc
Hi Experts,
How to handle Tree structure in bdc, can any one have any idea regarding this.
In the top most of the tree i have : Occupational Health under that Identification is there .
Occupational Health
Identification
Regards,
Sudhakar Reddy.AHi Experts,
Thanks Parvatha reddy for your reply.
Can any one provide BAPI for this T.Code EHSQCATOH or can any one tell me how to handle Tree structure .
Regards,
Sudhakar Reddy .A -
How to handle currency fields in BDC
Hi All,
Please tell me how to handle currency fields in BDC.... If possible give me some sample code...
Thanks in advance,
points will be given,
praveena.Declared it at the Global definitions.
in global data tab and currency/quant fields.
Initialize some value there itself.
Just before the text node create one program lines node,
and that,In the import and export parameters of it give total_amount.
refer to the following link:
http://sap-img.com/abap/figure-to-words-for-india-but-can-be-modified-to-any-requirement.htm
Currency Fields
Reward if useful. -
Holder(A008) is not maintaing in HRP1001 (BDC - Call Transaction Method)
Dear Friends,
Holder (A008) in HRP1001 is not maintained for some hiried persons through BDC - Call Transaction Method.
Except Holder update eveything is updated in the hrp1001.
When we hire a perosn through PA40, then its automatically maintaining Holder ( A008 ) in HRP1001. But for the same case through BDC program with Call Transaction method, its not maintaining Holder.
What can be reason behind not updating holder in HRP1001. How we can maintain Holder in this case.
Thanks
Rav
Edited by: Rav Jordan on Jan 10, 2012 8:03 AMHi Keshav,
Thanks for your response.
After running
CALL TRANSACTION 'PA40' USING BDCDATA
MODE CTUMODE " 'A'
UPDATE 'A'
MESSAGES INTO MESSTAB.
if sy-subrc eq '0'.
i am selecting perner created from pa0002.
now to update holder i am using fucntion module.
WA_HOLD-AEDTM = SY-DATUM.
WA_HOLD-UNAME = SY-UNAME.
WA_HOLD-OBJID = P_PLANS.
WA_HOLD-BEGDA = DT.
WA_HOLD-ENDDA = '99991231'.
WA_HOLD-OTYPE = 'S'.
WA_HOLD-PLVAR = '01'.
WA_HOLD-RSIGN = 'A'.
WA_HOLD-RELAT = '008'.
WA_HOLD-SCLAS = 'P'.
WA_HOLD-SOBID = GD_PERNR.
CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
FCODE = 'INSE'
VTASK = 'A'
ORDER_FLG = 'X'
COMMIT_FLG = 'X'
AUTHY = 'X'
PPPAR_IMP =
OLD_TABNR = ' '
REPID = ' '
FORM = ' '
KEEP_LUPD =
WORKF_ACTV = 'X'
TABLES
INNNN = WA_HOLD
ILFCODE =
EXCEPTIONS
NO_AUTHORIZATION = 1
ERROR_DURING_INSERT = 2
REPID_FORM_INITIAL = 3
CORR_EXIT = 4
BEGDA_GREATER_ENDDA = 5
OTHERS = 6
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.
This also not updating holder in the hrp1001 postion in the table.
May i know where to do change in the code so that holder can be maintained.
Thanks
Rav -
Error in BDC CALL TRANSACTION METHOD..
hai i got an error in doing BDC CALL TRANSACTION METHOD
Error:diffrent number of parameters in FORM and PERFORM(routine :FILL_SCREEN_DETAILS:,number of formal parameters :3,number of actual parameters:1)
PROGRAM
REPORT ZDEMO_UPLOAD_COST_CENTER_DATA.
DATA:BEGIN OF WA_DATA,
KOKRS TYPE KOKRS,"CONTROLLING AREA
KOSTL TYPE KOSTL,"COST CENTER
DATAB TYPE DATAB,"START DATE
DATBI TYPE DATBI,"END DATE
KTEXT TYPE KTEXT,"NAME
LTEXT TYPE LTEXT,"DESCRIPTION
VERAK TYPE VERAK,"PERSON RESPONSIBLE
KOSAR TYPE KOSAR, "COST CENTER CATEGORY
KHINR TYPE KHINR,"HIERARCHY AREA
BUKRS TYPE BUKRS,"COMPANY CODE
GSBER TYPE GSBER,"BUISINESS AREA
END OF WA_DATA.
*TYPES:IT_DATA TYPE STANDARD TABLE OF TY_DATA.
DATA:IT_DATA LIKE TABLE OF WA_DATA,
IT_BDCDATA LIKE TABLE OF BDCDATA,
WA_BDCDATA LIKE LINE OF IT_BDCDATA,
IT_BDCMSGCOLL LIKE TABLE OF BDCMSGCOLL,
WA_BDCMSGCOLL LIKE LINE OF IT_BDCMSGCOLL.
DATA :V_FILE TYPE STRING.
CONSTANTS :C_KS01(4) TYPE C VALUE 'KS01',
C_X(1) TYPE C VALUE 'X',
C_A(1) TYPE C VALUE 'A'.
SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
PARAMETER :PA_FILE LIKE FC03TAB-PL00_FILE OBLIGATORY.
SELECTION-SCREEN:END OF BLOCK B1.
*AT SELECTION SCREEN ON VALUE REQUEST
* EVENT TO BE TRIGGERED WHEN WE PRESS F4.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PA_FILE.
PERFORM GET_F4_FOR_FILE USING PA_FILE.
* START-OF-SELECTION
START-OF-SELECTION.
*WE NEED TO MOVE THE PA_FILE INTO ANOTHER VARIABLE OF TYPE STRING
*AS WE ARE GOING TO USE THE SAME IN THE FM:GUI_UPLOAD THERE THE FILE TYPE IS STRING
V_FILE = PA_FILE.
PERFORM UPLOAD_FILE_T0_ITAB USING V_FILE CHANGING IT_DATA.
*FILL THE SCREEN AND FIELD DETAILS
LOOP AT IT_DATA INTO WA_DATA.
REFRESH IT_BDCDATA.
*FIRST SCREEN DETAILS
PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1''0200''X'.
*CURSOR DETAILS
PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR''CSKSZ-KOKRS'.
*OK CODE DETAILS
PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE''/00'.
*CONTROLLING AREA
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KOKRS' WA_DATA-KOKRS.
*COST CENTER DETAILS
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KOSTL' WA_DATA-KOSTL.
* START DATE
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-DATAB_ANFO' WA_DATA-DATAB.
*END DATE
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-DATBI_ANFO' WA_DATA-DATBI.
*NEXT SCREEN DETAILS
PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1''0299''X'.
*OKCODE DETAILS
PERFORM FILL_FIELD_DETAILS USING 'BDC_OKCODE''=BU'.
*SUBSCRN FIELD DETAILS
PERFORM FILL_FIELD_DETAILS USING 'BDC_SUBSCR''BDC-SUBSCR'.
*CURSOR DETAILS
PERFORM FILL_FIELD_DETAILS USING 'BDC_CURSOR''CSKSZ-WAERS'.
*NAME
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KTEXT' WA_DATA-KTEXT.
*DESCRIPTION
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-LTEXT' WA_DATA-LTEXT.
*PERSON RESPONSIBLE
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-VERAK' WA_DATA-VERAK.
*COST CENTER CATEGORY
PERFORM FILL_FIELD_DETAILS USING'CSKSZ-KOSAR' WA_DATA-KOSAR.
*HIERARCHY AREA
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-KHINR' WA_DATA-KHINR.
*COMPANY CODE
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-BUKRS' WA_DATA-BUKRS.
*BUISINESS AREA
PERFORM FILL_FIELD_DETAILS USING 'CSKSZ-GSBER' WA_DATA-GSBER.
*CALL THE TRANSACTION
CALL TRANSACTION C_KS01 USING IT_BDCDATA
MODE C_A "ALL SCREENS
"N-NO SCREENS
"E-ERROR SCREENS ONLY
UPDATE 'A' "ASYNCHRONOUS
"SYNCHRONOUS
MESSAGES INTO IT_BDCMSGCOLL.
ENDLOOP.
* FORM FILL SCREEN_DETAILS
FORM FILL_SCREEN_DETAILS USING PROGRAM LIKE BDCDATA-PROGRAM
DYNPRO LIKE BDCDATA-DYNPRO
DYNBEGIN LIKE BDCDATA-DYNBEGIN.
CLEAR WA_BDCDATA.
WA_BDCDATA-PROGRAM = PROGRAM.
WA_BDCDATA-DYNPRO = DYNPRO.
WA_BDCDATA-DYNBEGIN = DYNBEGIN.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDOFRM.
* FORM FILL_FIELD_DETAILS
FORM FILL_FIELD_DETAILS USING FNAM FVAL.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = FNAM.
WA_BDCDATA-FVAL = FVAL.
APPEND WA_BDCDATA TO IT_BDCDATA.
ENDFORM.
* FORM GETE_F4_FOR_FILE
*DISPLAY ALL THE FILES IN THE SYSTEM FOR SELECTION
*P_PA_FILE NAME OF THE FILE
FORM GET_F4_FOR_FILE USING P_PA_FILE.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
* EXPORTING
* PROGRAM_NAME = SYST-REPID
* DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'PA_FILE'
* STATIC = ' '
* MASK = ' '
CHANGING
FILE_NAME = PA_FILE.
* EXCEPTIONS
* MASK_TOO_LONG = 1
* OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
* FORM UPLOAD_FILE_TO_ITAB
* FP_V_FILE = FILE NAME
*FP_IT_DATA = INTERNAL TABLE TO STORE THE DATA
FORM UPLOAD_FILE_TO_ITAB USING FP_V_FILE CHANGING FP_IT_DATA LIKE IT_DATA.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FP_V_FILE
HAS_FIELD_SEPARATOR = ' X'
TABLES
DATA_TAB =FP_IT_DATA.
ENDFORM.
Edited by: saifudheenc on Aug 7, 2010 5:09 PMhi
try to add spaces between parameters :
example:
PERFORM FILL_SCREEN_DETAILS USING 'SAPLKMA1' '0200' 'X'.
regards,darek
Maybe you are looking for
-
Difference in Cash Balance in Cash Journal and Cash GL Account
dear friends, Can somebody tell me the reason and solution to following problem - 1. User entered on Cash Payment ( FBCJ ) entry for Vendor with TDS activated. 2. Due to some mistake in amount , he reversed the same ( FB08 ) , however amount reversed
-
A calendar import went awry. How can I stop it.
While importing a copy of an ical calendary, I get an errot. Already on the server with 3 options: ignore, revert to server or try again. The error seems to want to do this event by event on the calendary which is I don't know how many years. I can't
-
Iphone 5S warmer color temperature (yellow hue)
Hi guys, Yes another yellowgate thread I am afraid... Ive compared my iphone 5 with the iphone 5s. Both devices set to full brighntess...both running ios7....and its quite clear that my iphone 5S seems to have a much warmer color temperature when co
-
Hi I have a scenario in my project with regards to pricing The pricing for the client is as follows There are four condition types ZCON1--Basic price ZCON2-Premium ZCON3-Discount 1 ZCON4-Discount 2 Based on the these foutr values a fifth condition ty
-
Unable to Install Quicktime 7 Update
I've tried several times to update the current version of Quicktime but each time I get the message that the current version can not be uninstalled. I've tried Add/Remove in XP as well as a stand-alone uninstaller but neither can remove Quicktime. I