BDC Sessions says it is locked.....
Hi All,
We were running two BDC Sessions at the same time updating the table. Suddenly the SAP got shut down. After few minutes i could see both BDC Sessions are "still under processing" status but the postings got stopped. When i entered SM12 and could see the First BDC session is locked. So both the BDC sessions are still pending. But the next BDC sessions after these two, got processed succesfully. My problem is two BDC sessions half of the postings were done, so couldn't delete the sessions.
Kindly help me out in this issue.
Thanks
Srikanth.
Hi,
Check with your Basis, they can help you.
Rgds,
Sreeni
Similar Messages
-
BDC session error handling for IW41 transaction
Hi,
When the order confirmation is done by BDC session program, it is executed without any error. But if we do the same process manually, it is showing the error message as 'Posting period is Locked for 001 2012'. My question here is why this is not happening when it is executed through bdc session program.
Anyone can help us?
Thanks,
GunaIt is difficult to believe that you would get good results from background BDC process and error in foreground using same transaction and exactly the same data. Beyond that, why is month 1 of the current year locked? Are you absolutely sure that:
BDC works correctly? maybe does NOT and the errors have been missed or ignored?
Data is precisely the same for both BDC sessions?
Same transaction is called?
Sounds silly perhaps, but I have to believe that something is very different between the two sessions. -
ZXPADU02 - How To Stop It From Being Triggered in a BDC Session
I have an edit in ZXPADU02 that says if you are trying to change IT0167 you will get a POPUP Message telling you we don't want you doing that. My problem is that I am using PA30 in a BDC session in another program to update IT167 and it is causing the User Exit to trigger the message, which gets an error because it can't display the POPUP. Is there some way I can have this message NOT be triggered when I use PA30 in a BDC?
Hi,
You can one thing. When you are calling PA30 through BDC then you can populate some custom table with some value and in the exit check whether the custom table contains that value. If it contains then you can skip it. Other wise you can put keep some field vale in memory and then read the value from memory in the user exit. Based on that you can modify your code.
Thanks & Regards,
Sandip -
BDC Session Saves Data Only in Foreground
I have created a bdc program to create an SM35 session of CA02. The wierd thing is that the session will run in background with no errors, but the data is not updated. If I run the session in foreground the data is updated. Have I overlooked something simple?
To see what is going on, I commented out the save at the end to force it to error out. If I run the session in foreground the data is changed. If I run it in display errors only mode, the data is not changed. So it seems not to have anything to do with the save at the end. Perhaps it is now appropriate to post some of the code.
After the data file is uploaded into the itab and the bdc group has been created, for each routing group I do the following:
PERFORM dynpro USING:
* *** Initial Screen ***
'X' 'SAPLCPDI' '1010',
' ' 'RC271-PLNNR' gk_rec-groupnum,
' ' 'BDC_OKCODE' '/00',
* *** Header Overview ***
'X' 'SAPLCPDI' '1200',
' ' 'BDC_OKCODE' 'MTUE'. "open material allocation screen
Then for each material allocation the data file says to delete:
PERFORM dynpro USING:
* *** Material Allocation ***
'X' 'SAPLCZDI' '1010',
' ' 'RC27X-ENTRY_ACT' gv_entry, "gv_entry holds row number to delete
' ' 'BDC_OKCODE' 'ENT1', "position button
'X' 'SAPLCZDI' '1010',
' ' 'BDC_CURSOR' 'MAPL-MATNR(01)', "place cursor on the line to delete
' ' 'BDC_OKCODE' 'LOE', "delete line
'X' 'SAPLSPO1' '0100',
' ' 'BDC_OKCODE' 'YES'. "confirm dialog
then at the end of the session:
PERFORM dynpro USING:
'X' 'SAPLCZDI' '1010',
' ' 'BDC_OKCODE' 'BACK', "leave material allocation screen
'X' 'SAPLCPDI' '1200',
' ' 'BDC_OKCODE' 'BU'. "save
Then, I insert into the bdc session using tcode ca02. All this given the following subroutine:
FORM dynpro USING p_dynbegin TYPE any p_name TYPE any p_value TYPE any.
CLEAR gk_bdc_tab.
IF p_dynbegin = 'X'.
MOVE: p_name TO gk_bdc_tab-program,
p_value TO gk_bdc_tab-dynpro,
'X' TO gk_bdc_tab-dynbegin.
ELSE.
MOVE: p_name TO gk_bdc_tab-fnam,
p_value TO gk_bdc_tab-fval.
ENDIF.
APPEND gk_bdc_tab TO gt_bdc_tab.
ENDFORM.
It seems that the cursor isn't specifying the line to delete when run in background. -
Question in BDC session method.
Hi guys,
I am trying to upload BOM using BDC session method.
While doing this, i have learnt the steps by heart. But i do not understrand the logic behind the steps. For example, why do we include this statement
Data: IT-BDC like BDCDATA occurs 0 with headerline.
What if we don't include this statement?
Moderator message: sorry, these forums are not targeted to provide step by step guides to beginners, please search for available information, take courses, etc.
locked by: Thomas Zloch on Sep 10, 2010 1:06 PMHello Dhirendra,
Thanks for immediate reply. I want to understand BDC method conceptually. What exactly happens by performing each step.
I am putting up the BDC i made. I copied some of the code from here and there. It works fine but i don't understand the purpose of BDCDATA,
call transaction 'cs01'
and form bdc_dynpro and form bdc_field.
I am quite new to ABAP. Please don't mind if i ask dumb questions.
I am unable to understand how control flows through the code logic.
report ZBDCFORCS01
no standard page heading line-size 255.
*include bdcrecx1.
DATA: IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_MSGCOLL LIKE BDCMSGCOLL OCCURS 0.
TYPES TRUXS_T_TEXT_DATA(4096) TYPE C OCCURS 0.
DATA: I_TAB_RAW_DATA TYPE TRUXS_T_TEXT_DATA.
DATA: BEGIN OF ITAB OCCURS 0,
MATNR(18),
WERKS(4),
STLAN(1),
IDNRK(18),
MENGE(20),
END OF ITAB.
SELECTION-SCREEN: BEGIN OF BLOCK b1.
PARAMETERS: CS01FILE TYPE RLGRAP-FILENAME.
SELECTION-SCREEN: END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR CS01FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = CS01FILE
start-of-selection.
CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
I_TAB_RAW_DATA = I_TAB_RAW_DATA
I_FILENAME = CS01FILE
TABLES
I_TAB_CONVERTED_DATA = ITAB[]
EXCEPTIONS
CONVERSION_FAILED = 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.
*perform open_group.
LOOP AT ITAB.
perform bdc_dynpro using 'SAPLCSDI' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RC29N-STLAN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29N-MATNR'
'1400-500'.
itab-matnr.
perform bdc_field using 'RC29N-WERKS'
'1000'.
itab-werks.
perform bdc_field using 'RC29N-STLAN'
'1'.
itab-stlan.
perform bdc_field using 'RC29N-DATUV'
'10.09.2010'.
perform bdc_dynpro using 'SAPLCSDI' '0110'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29K-BMENG'
'1'.
perform bdc_field using 'RC29K-STLST'
'1'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-EXSTL'.
perform bdc_dynpro using 'SAPLCSDI' '0111'.
perform bdc_field using 'BDC_CURSOR'
'RC29K-LABOR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-MENGE(02)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RC29P-IDNRK(01)'
'1300-320'.
ITAB-IDNRK.
perform bdc_field using 'RC29P-IDNRK(02)'
'1300-312'.
ITAB-IDNRK.
perform bdc_field using 'RC29P-MENGE(01)'
'2'.
ITAB-MENGE.
perform bdc_field using 'RC29P-MENGE(02)'
'2'.
ITAB-MENGE.
perform bdc_dynpro using 'SAPLCSDI' '0130'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR'.
perform bdc_field using 'RC29P-POSNR'
'0010'.
perform bdc_field using 'RC29P-IDNRK'
'1300-320'.
perform bdc_field using 'RC29P-MENGE'
'2'.
perform bdc_field using 'RC29P-MEINS'
'PC'.
perform bdc_dynpro using 'SAPLCSDI' '0131'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POTX1'.
perform bdc_field using 'RC29P-SANKA'
'X'.
perform bdc_dynpro using 'SAPLCSDI' '0130'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR'.
perform bdc_field using 'RC29P-POSNR'
'0020'.
perform bdc_field using 'RC29P-IDNRK'
'1300-312'.
perform bdc_field using 'RC29P-MENGE'
'2'.
perform bdc_field using 'RC29P-MEINS'
'PC'.
perform bdc_dynpro using 'SAPLCSDI' '0131'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POTX1'.
perform bdc_field using 'RC29P-SANKA'
'X'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLCSDI' '0140'.
perform bdc_field using 'BDC_CURSOR'
'RC29P-POSNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FCBU'.
perform bdc_transaction using 'CS01'.
*perform close_group.
CALL TRANSACTION 'CS01' USING IT_BDC
MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_MSGCOLL.
REFRESH IT_BDC.
ENDLOOP.
FORM BDC_DYNPRO USING PROGRAM_DYNPRO.
CLEAR IT_BDC.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDC.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
Edited by: Yayati6260 on Sep 10, 2010 12:29 PM -
Please Help using BAPI_TRANSACTION_COMMIT in BDC session
Hi,
I am using custom transaction to create vendor invoices by using function module BAPI_INCOMINGINVOICE_CREATE and it creates the invoice and go to BAPI_TRANSACTION_COMMIT to commit the database updates.
The problem is when i am creating the invoice for multiple PO's using BDC session method this program executes only of one PO's and commits created invoice data and comes out of the program with out continuing to further steps after BAPI_TRANSACTION_COMMIT FM execution. Please advise me how to resolve this.
Regards,
ChallaHello Challa
The command
CALL TRANSACTION USING...
has to optional addition
OPTIONS FROM ls_options.
where ls_options is of type CTU_PARAMS.
In the documentation of CALL TRANSACTION is says that if RACOMMIT = 'X' then CALL TRANSACTION USING... is not completed by COMMIT.
I guess the commit work does prematurely finish your BDC session if this option is initial.
Regards
Uwe -
My requirement says that if BDC sessions are generated by the process, they are to be submitted with the prefix of HR_TSD. I am not able to understand this requirement. Anyone Pls explain.
Thanks in advance.Define a parameter on selction screen for session name and use it .
PARAMETERS:p_fname LIKE rlgrap-filename OBLIGATORY,
p_group LIKE apqi-groupid OBLIGATORY.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
* DEST = ' '
group = p_group
holddate = v_date
keep = 'X'
user = sy-uname
* RECORD = ' '
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. -
What is structure of BDC session?
Hi Experts,
What is structure of BDC session?
Thanks
~Sid
"Max points are assured"Hi,
If you want to write your own program, proceed as follows:
Generate the batch input session using function module BDC_OPEN_GROUP
The proceed as follows for each transaction that session contains:
In the BDCDATA structure, enter the value for all screens and fields that must be processed in the transaction.
Use BDC_INSERT to transfer the transaction and BDCDATA structure to the session.
Close the batch input session with BDC_CLOSE_GROUP
Start to process the generated session.
BDC_OPEN_GROUP
Use the BDC_OPEN_GROUP function module to create a new session. Once you have created a session, then you can insert batch input data into it with BDC_INSERT.
You cannot reopen a session that already exits and has been closed. If you call BDC_OPEN_GROUP with the name of an existing session, then an additional session with the same name is created.
A batch input program may have only one session open at a time. Before opening a session, make sure that any sessions that program closes any sessions that it previously had opened.
BDC_OPEN_GROUP takes the following EXPORTING parameters:
CLIENT
Client in which the session is to be processed. Default: If you dont provide a value for this parameter, the default is the client under which the bathc input program runs when the session is created.
GROUP
Name of the session that is to be created. May up to 12 characters long. Default: None. You must specify a session name.
HOLDDATE
Lock date. The session is locked and may not be processed until after the date that you specified. Only a system administrator with the LOCK authorization for the authorization object Batch Input Authorizations can unlock and run a session before this date.
KEEP
Retain session after successful processing. Set this option to the value X to have a session kept after it has been successfully processed. A session that is kept remains in the input/output queue until an administrator deleletes it. Sessions that contain errors in transactions are kept even if KEEP is not set. Default: If not set, then sessions that are successfully processed are deleted. Only the batch input log is kept.
USER
Authorizations user for background processing. This is the user name that is used for checking authorizations if a session is started in background processing. The user must be authorized for all of transactions and functions that are to be executed in a session. Otherwise, transactions will be terminated with no authorization errors. The user can be of type dialog or background. Dialog users are normal interactive users in the R/3 System. Background users are user master records that are specially defined for providing authorizations for background processing jobs.
BDC_INSERT
Use the BDC_INSERT function module to add a transaction to a batch input session. You specify the transaction that is to be started in the call to BDC_INSERT. You must provide a BDCDATA structure that contains all of the data required to process the transaction completely.
BDC_INSERT takes the following parameters:
TCODE
The code of the transaction that is to be run.
POST_LOCAL
Parameter to update data locally. If POST_LOCAL = X, data will be updated locally.
DYNPROTAB
The BDCDATA structure that contains the data that is to be processed by the transaction. DYNPROTAB is a table parameter in the function module.
BDC_CLOSE_GROUP
Use the BDC_CLOSE_GROUP function module to close a session after you have inserted all of your batch input data into it. Once a session is closed, it can be processed.
BDC_CLOSE_GROUP needs no parameters. It automatically closes the session that is currently open in your program. You must close a session before you can open another session from the same program.
BDCDATA Structure
IF you want to write data to a batch input session or to process the data using CALL TRANSACTION USING or CALL DIALOG, you must prepare an internal table <bdc_tab>. This internal table must be structured according to ABAP Dictionary structure BDCDATA. The internal table <bdc_tab> stores the data that is to be entered into R/3 System and the actions that are necessary to process data. You can think of the table as storing the script that the R/3 System is to follow in processing batch input data.
BDC table structure
FIELD TYPE DESCRIPTION
Program CHAR (8) Program name of transaction.
DynPro CHAR (4) Screen number of transaction.
DynBegin CHAR (1) Indicator for new screen.
Fnam CHAR (35) Name of database field from screen.
Fval CHAR (80) Value to submit to field.
Regards,
Omkar.
Message was edited by:
Omkaram Yanamala -
URGENT - HOW TO PROCESS A BDC SESSION (IN BACKGROUND) FROM INSIDE A REPORT
Hi All,
I have a requirement wherein I need to create a BDC session for mass update(from file) of one transaction and check if at all that update has taken place and proceed with the same session for another transaction.
For this I need to know how to process the session in background in a report, so that if the processing is done, the next set of data to update a different transaction can happen.
All inputs are welcome and highly valuable to me.
If someone is unable to intrepret this, I'll detail it again.
Thanks in advance,
Vaishnavi VaradarajanHi,
1.Use RSBDCDRU is an exe pg.With this u can download the logs into local file.
2.It will create the spool request .from there u can download or print.
OtherWise:
Use the code from the link below. U need to provide the session queue id as input and it will download the log to an excel file. U can change it to ur reqmt.
Re: BDC
regards
kiran -
Error in my BDC SESSION METHOD
Hi,
I was trying work on BDC SESSION METHOD AND MY TCODE IS XK01.
Here is my code can some one tell me where i am doing wrong becoz its not giving the output as I expected. And I am uploading a tab delimeter file.
report ZAN_BDCVENDOR
no standard page heading line-size 255.
include bdcrecx1.
DATA: I_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF RECORD OCCURS 0,
LIFNR(016),
BURKS(004),
EKORG(004),
KTOKK(004),
AKONT(010),
FDGRV(010),
WAERS(005),
END OF RECORD.
start-of-selection.
perform open_group.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\VENDOR.TXT'
FILETYPE = 'ASC'
tables
data_tab = RECORD
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT RECORD.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'USE_ZAV'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
'8765'.
perform bdc_field using 'RF02K-BUKRS'
'1000'.
perform bdc_field using 'RF02K-EKORG'
'1000'.
perform bdc_field using 'RF02K-KTOKK'
'0001'.
perform bdc_field using 'USE_ZAV'
'X'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFB1-AKONT'
'160000'.
perform bdc_field using 'LFB1-FDGRV'
'A1'.
perform bdc_dynpro using 'SAPMF02K' '0310'.
perform bdc_field using 'BDC_CURSOR'
'LFM1-WAERS'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFM1-WAERS'
'usd'.
perform bdc_transaction using 'XK01'.
ENDLOOP.
perform close_group.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = 'SESSION1'
HOLDDATE = FILLER8
KEEP = FILLER1
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.
WRITE 'ERROR IN OPEN_GROUP'.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
dynprotab = I_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.
I appreciateHi,
i guess, the error is due to, u didnt pass the TCODE parameter in BDC_INSERT FM.
Try by passing it...
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = TCODE*
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
dynprotab = I_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
Hope it works!!
Regards,
Pavan -
Is possible to skip first screen in BDC Session
Hi all,
Is it possible like in call transaction method to skip first screen in Batch input session?
Syntax----
call transaction MM01 and skip first screen.
I want same result By using Batch input session.
Suggess..........
Thanks
Sanket sethiActually i am open transaction SE38 and execute an Standard Report.In the selectiion screen I am changing something in layout.
I recorded it by BDC.
And use batch input session.
Now i want to skip the se38 window i want to drop user on the execution of the report.
I also do it by submit report but i want to know that is there any possibilities to use with BDC session.
Thanks
Sanket -
After it downloads and i click the icon it says disk is locked and something about a license I have windows vista and i am the administrator
Which error are you getting? Are you getting the "locked disk" or the "cannot be found or created"?
-
Creation of Material using BDC Session method & global class
Hi
Creation of Material using BDC Session method & global class by using oops.
can anyone plz help me outHi,
it looks like it's not possible to call this BAPI wihtout material number. Here is a quote from BAPI documentation.
When creating material master data, you must transfer the material
number, the material type, and the industry sector to the method. You
must also enter a material description and its language.
Cheers -
Creating Sales order texts while using BDC session method is not working
Hi All,
I have an existing program which creates sales order using BDC session method.( Actual program uses BAPI to create sales order and in case if any error occurs during creation of sales order BDC session is generated so that user can process it later and i am facing issues in this part of code where it uses BDC)
I wanted to modify this BDC sesion to update the sales order text also. I tried recording VA01 for creationg sales order text unfortunatly it is not capturing the data i am entering in the text fields.
Please suggest if there is any way to create sales order using BDC.
Regards
SheebaHi Madhu,
'=TP_CREATE' is the OK code i am getting for creating TEXTS. But the text entered are not captured in BDC.
Part of BDC program generated for cretaing sales order texts.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=%_GC 128 22'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=TP_CREATE'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'LV70T-SPRAS'
'EN'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
Regards,
Sheeba -
Problem in bdc session method for tcode FS00
Hi Experts,
problem in bdc session method, when i run this program no output is shown.
Even it is not calling the transaction.
code as follows.
*& Report Z_GL_MASTER
*& CATEGORY = BDC.
*& DESCRIPTION = UPLOADING G/L MASTER RECORDS.
*& TECHNICAL CONST = FRANCIS REDDY.
*& FUNTIONAL CONST = FICO.
REPORT Z_GL_MASTER.
*& Internal Table
DATA : BEGIN OF IT_UPLOAD OCCURS 0,
SAKNR LIKE GLACCOUNT_SCREEN_KEY-SAKNR, " ACCOUNT NUMBER.
BUKRS LIKE GLACCOUNT_SCREEN_KEY-BUKRS, " COMPANY CODE.
KTOKS LIKE GLACCOUNT_SCREEN_COA-KTOKS, " ACCOUNT GROUP.
XPLACCT LIKE GLACCOUNT_SCREEN_COA-XPLACCT, " P&L STATEMEMENT.
GVTYP LIKE GLACCOUNT_SCREEN_COA-GVTYP, " P&L STATEMENT TYPE.
XBILK LIKE GLACCOUNT_SCREEN_COA-XBILK, " BALANCE SHEET STATEMENT
SHORT LIKE GLACCOUNT_SCREEN_COA-TXT20_ML, " SHORT TEXT.
LONG LIKE GLACCOUNT_SCREEN_COA-TXT50_ML, " LONG TEXT.
WAERS LIKE GLACCOUNT_SCREEN_CCODE-WAERS, " ACCOUNT CURRENCY.
XSALH LIKE GLACCOUNT_SCREEN_CCODE-XSALH, " ONLY BALANCES IN LOCAL CURRENCY.
MITKZ LIKE GLACCOUNT_SCREEN_CCODE-MITKZ, " RECONCILATION ACCOUNT FOR ACCOUNT TYPEGLACCOUNT_SCREEN_CCODE-MITKZ
XOPVW LIKE GLACCOUNT_SCREEN_CCODE-XOPVW, " OPEN ITEM MANAGEMENT.
XKRES LIKE GLACCOUNT_SCREEN_CCODE-XKRES, " LINE ITEM DISPLAY.
ZUAWA LIKE GLACCOUNT_SCREEN_CCODE-ZUAWA, " SORT KEY.
FSTAG LIKE GLACCOUNT_SCREEN_CCODE-FSTAG, " FIELD STATUS GROUP.
XGKON LIKE GLACCOUNT_SCREEN_CCODE-XGKON, " RELAVENT CASH FLOW.
END OF IT_UPLOAD.
*& Internal Table FOR BDC DATA.
DATA : IT_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE.
*& DATA DECLARATIONS.
DATA : V_FILE LIKE RLGRAP-FILENAME.
*& SELECTION SCREEN.
PARAMETER : P_FILE LIKE V_FILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM GET_FILENAME.
START-OF-SELECTION.
PERFORM UPLOAD_DATA.
PERFORM BDCDATA_OPEN.
PERFORM BDC_POPULATE.
PERFORM BDC_CLOSE.
*& Form GET_FILENAME
form GET_FILENAME .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
endform. " GET_FILENAME
*& Form UPLOAD_DATA
form UPLOAD_DATA .
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_FILE
FILETYPE = 'DAT'
TABLES
data_tab = IT_UPLOAD.
endform. " UPLOAD_DATA
*& Form BDCDATA_OPEN
FORM FOR BDC_OPEN_GROUP.
form BDCDATA_OPEN .
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'GLMASTER'
HOLDDATE = SY-DATUM
KEEP = 'X'
USER = SY-UNAME.
endform. " BDCDATA_OPEN
*& Form BDC_POPULATE
POPULATING BDC DATA .
form BDC_POPULATE .
loop at it_upload.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=ACC_CRE'.
PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_KEY-SAKNR'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-SAKNR' IT_UPLOAD-SAKNR.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_KEY-BUKRS' IT_UPLOAD-BUKRS.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_GROUP'.
PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-KTOKS'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-KTOKS' IT_UPLOAD-KTOKS.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XPLACCT' IT_UPLOAD-XPLACCT.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=2102_BS_PL'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-GVTYP' IT_UPLOAD-GVTYP.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-XBILK' IT_UPLOAD-XBILK.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_CURSOR' 'GLACCOUNT_SCREEN_COA-TXT20_ML'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT20_ML' IT_UPLOAD-SHORT.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_COA-TXT50_ML' IT_UPLOAD-LONG.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=TAB02'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-WAERS' IT_UPLOAD-WAERS.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XSALH' IT_UPLOAD-XSALH.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-MITKZ' IT_UPLOAD-MITKZ.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XOPVW' IT_UPLOAD-XOPVW.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XKRES' IT_UPLOAD-XKRES.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA' IT_UPLOAD-ZUAWA.
PERFORM BDC_SUB1 USING 'X' 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
PERFORM BDC_SUB2 USING 'BDC_OKCODE' '=TAB03'.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-FSTAG' IT_UPLOAD-FSTAG.
PERFORM BDC_SUB2 USING 'GLACCOUNT_SCREEN_CCODE-XGKON' IT_UPLOAD-XGKON.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FS00'
TABLES
dynprotab = IT_BDCDATA.
endloop.
endform. " BDC_POPULATE
*& Form BDC_CLOSE
FORM FOR CLOSING BDC_GROUP
form BDC_CLOSE .
CALL FUNCTION 'BDC_CLOSE_GROUP'.
endform. " BDC_CLOSE
*& Form BDC_SUB1
FORM FOR BDCDATA.
form BDC_SUB1 USING A B C.
CLEAR IT_BDCDATA.
IT_BDCDATA-DYNBEGIN = A.
IT_BDCDATA-PROGRAM = B.
IT_BDCDATA-DYNPRO = C.
APPEND IT_BDCDATA.
endform. " BDC_SUB1
*& Form BDC_SUB2
text
form BDC_SUB2 USING A B.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = A.
IT_BDCDATA-FVAL = B.
APPEND IT_BDCDATA.
endform. " BDC_SUB2
Points will be rewarded.
Thanks in advance.
Francis.Hi,
Once the program is executed..It will a BDC session..
THen you have to use the transaction SM35..To process the BDC session..
Thanks,
Naren
Maybe you are looking for
-
My iphone 5 won't charge or switch on, what should i do?
my iphone 5 won't charge or switch on, what should i do?
-
Brand new Ipod touch 5g problems
I purchased one of the new colored Ipod touches, however, whenever I attempt to connect it to itunes it is stuck in recovery mode. When I attempt to put it in my computer, the computer asks me to recover it's software, however, I will download 6.0.1
-
Adobe AIR 1.5 - Package AIR installer as a native Windows Executable (.EXE)
Hello Adobe AIR community, Is there any way to package the installer for an Adobe AIR application using Adobe AIR 1.5 as an executable (.EXE) file? I found that this is possible for Adobe AIR 2.0, but it requires an upgrade to Adobe AIR 2.0 runtime.
-
Access() doesn't work correctly
Hi. I'm porting existing C++ code on flascc and it seems that there is some problem with access() realization. It always returns 0 even if file doesn't exist at all. You can easily represent this issue on sample 07. Just add something like this at th
-
WHen I click on icon, I get can't find firefox.exe file error.
Simple. When I click on the icon. I get an error screen. telling me: cannot find the fozfire.exe file. I'm thoughtly removed it & re installed it, 4 times now. Even went back 2 a prior rev. still nada. Thaks, Mike in Detroit. <sub>edit: removed perso