How to process bdc session ?
Hi ,
Suppose I created a session BDC . Then How can I process it ? by using sm36 or any standard program ? If any standard program is there how to use it ?
hi,
Goto transaction SM35, in the displayed list of sessions,select the session you want to execute and then click on Execute button or press F8.
SM36 is for creating background jobs
*Reward points if its helpful
Similar Messages
-
How to process a Session automatically ?
Hi everybody,
I am new to ABAP. Pls clear my doubt.
I had done a BDC using a session method. Every time should i need to goto SM35 & process the session? Or is there any other method to process the session automatically? If yes how. Pls give in detail. Can we shedule the session?
Thanks in advance.
Vijay.HI
GOOD
YOU CAN USE RSBDCSUB TO SCHEDULE YOUR BDC PROGRAM -
RSBDCSUB Release batch-input sessions automatically
http://www.auditnet.org/docs/SAPR3AuditingGuidelines.pdf
http://www.sappoint.com/abap/files.pdf
http://www.anao.gov.au/WebSite.nsf/Publications/4A256AE90015F69B4A25691C000B27FE/$file/ORIGINAL_handbook.pdf
THANKS
MRUTYUN -
Process bdc session in Background
Hi all,
I have created a BDC Session, Now i want to process it in Foreground not in Background.
I know taht we use report RSBDCSUB for background processing but don't know the procedure for Forground.
Sugess.
Points will be sured for valuable answers.
Thanks
Sanket sethihi,
if you want it to be done by program then try this which is done through program
TABLES: LFA1,
RF02K.
TYPES: BEGIN OF TY_ITAB,
LIFNR LIKE RF02K-LIFNR,
KTOKK LIKE RF02K-KTOKK,
NAME1 LIKE LFA1-NAME1,
SORTL LIKE LFA1-SORTL,
LAND1 LIKE LFA1-LAND1,
SPRAS LIKE LFA1-SPRAS,
END OF TY_ITAB.
DATA: T_ITAB TYPE TABLE OF TY_ITAB,
W_ITAB TYPE TY_ITAB.
DATA: I_BDCDATA TYPE TABLE OF BDCDATA,
WA_BDCDATA TYPE BDCDATA.
DATA : ITAB1 LIKE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
DATA : JOBNAME(32) TYPE C,
JOBCOUNT(8) TYPE C.
DATA: R1 TYPE I VALUE 1,
C1 TYPE I VALUE 1,
R2 TYPE I VALUE 4,
C2 TYPE I VALUE 8,
FILEPATH LIKE RLGRAP-FILENAME.
SELECTION-SCREEN: BEGIN OF BLOCK B1.
PARAMETERS:P_SRCFIL LIKE RLGRAP-FILENAME.
SELECTION-SCREEN: END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_SRCFIL.
PERFORM SELECT_FILE USING P_SRCFIL.
START-OF-SELECTION.
FILEPATH = P_SRCFIL.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = FILEPATH
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 8
I_END_ROW = 4
TABLES
INTERN = ITAB1.
PERFORM ORGANIZE_UPLOADED_DATA.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = 'XK01'
HOLDDATE = FILLER8
KEEP = 'X'
USER = SY-UNAME.
LOOP AT T_ITAB INTO W_ITAB.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'RF02K-LIFNR'
W_ITAB-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-KTOKK'
W_ITAB-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1'
W_ITAB-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL'
W_ITAB-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1'
W_ITAB-LAND1.
PERFORM BDC_FIELD USING 'LFA1-SPRAS'
W_ITAB-SPRAS.
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' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0380'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'KNVK-NAMEV(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTR'.
CLEAR W_ITAB.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'XK01'
TABLES
DYNPROTAB = I_BDCDATA.
REFRESH I_BDCDATA.
ENDLOOP.
CALL FUNCTION 'BDC_CLOSE_GROUP' .
JOBNAME = 'JOB'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
JOBNAME = JOBNAME
IMPORTING
JOBCOUNT = JOBCOUNT
CHANGING
RET =
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4
IF SY-SUBRC = 0.
MESSAGE I000(0) WITH 'SUCCESSFUL JOB OPENING'.
SUBMIT RSBDCSUB
WITH MAPPE = 'XK01'
WITH VON = SY-DATUM
*WITH Z_VERARB = 'X'
WITH ERR = 'X'
WITH LOGALL = 'X'
AND RETURN EXPORTING LIST TO MEMORY.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = JOBCOUNT
JOBNAME = JOBNAME
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9
IF SY-SUBRC <> 0.
MESSAGE I000(0) WITH 'JOBCLOSE'.
ENDIF.
*& Form ORGANIZE_UPLOADED_DATA
text
--> p1 text
<-- p2 text
FORM ORGANIZE_UPLOADED_DATA .
SORT ITAB1 BY ROW COL.
LOOP AT ITAB1.
CASE ITAB1-COL.
WHEN 1.
W_ITAB-LIFNR = ITAB1-VALUE.
WHEN 2.
W_ITAB-KTOKK = ITAB1-VALUE.
WHEN 3.
W_ITAB-NAME1 = ITAB1-VALUE.
WHEN 4.
W_ITAB-SORTL = ITAB1-VALUE.
WHEN 5.
W_ITAB-LAND1 = ITAB1-VALUE.
WHEN 6.
W_ITAB-SPRAS = ITAB1-VALUE.
ENDCASE.
AT END OF ROW.
APPEND W_ITAB TO T_ITAB.
CLEAR W_ITAB.
ENDAT.
ENDLOOP.
ENDFORM. " ORGANIZE_UPLOADED_DATA
*& Form select_file
text
-->P_P_SRCFIL text
FORM SELECT_FILE USING P_SRCFIL.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_SRCFIL
ENDFORM. " select_file
*& Form bdc_dynpro
text
-->P_0131 text
-->P_0132 text
FORM BDC_DYNPRO USING PROGRAM LIKE BDCDATA-PROGRAM DYNPRO LIKE BDCDATA-DYNPRO.
CLEAR WA_BDCDATA.
WA_BDCDATA-PROGRAM = PROGRAM.
WA_BDCDATA-DYNPRO = DYNPRO.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO I_BDCDATA.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0136 text
-->P_0137 text
FORM BDC_FIELD USING FNAM LIKE BDCDATA-FNAM FVAL TYPE ANY .
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = FNAM.
WA_BDCDATA-FVAL = FVAL.
APPEND WA_BDCDATA TO I_BDCDATA.
ENDFORM. " bdc_field
reward if useful,
thanks and regards -
Hi All,
I want to know the command with we put in command window to kill batch input sessio. Could youplease help?
Thanks
SaurabhHello,
Put /BEND In the command window this would end BDC Session
regards
suresh nair -
How to delete BDC session ?
hi gurus,
In my scenario , Before runnning BDC ( calll transaction ) , I firstly create a session ( use : BDC_OPEN_GROUP) with group name = the file that used to upload data for BDC execution , Then I check If the BDC run without error I will use BDC_CLOSE_GROUP to delete this group or else the session is kept , But when I check In SM35 , There's no session deleted ? Could you please help me ?
Thanks>I will use BDC_CLOSE_GROUP to delete this group or else the session is kept , But when I check In >SM35 , There's no session deleted ? Could you please help me ?
BDC_CLOSE_GROUP is used to Close the session Group, if you close it you cannot insert any transactions/records to the the Session group , not for Deletion.
You want to Delete the session after the processing you have to use KEEP = ' '.
then once process is over the session will be deleted. -
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 -
How to Process "Being Created" Sessions
Dear Experts,
Program created sessions are tagged to be "Being Created". Can any one of you explain me how to process these sessions through a program again.?
It would be of great help and useful answers are rewarded.
Best Regards,
Arunkumar SAfter BDC_CLOSE_GROUP use rsbdcsub to run the session.
ex:
DATA: l_abap_list TYPE abaplist OCCURS 0 WITH HEADER LINE,
l_ascii_list(200) TYPE c OCCURS 0 WITH HEADER LINE.
SUBMIT rsbdcsub AND RETURN EXPORTING LIST TO MEMORY
WITH mappe = c_bdcname "Session name
WITH z_verarb = 'X'
WITH fehler = ' '.
COMMIT WORK AND WAIT.
Retrieve the output from memory and place into l_abap_list
CLEAR l_abap_list.
FREE l_abap_list.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = l_abap_list
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc EQ 0.
CLEAR l_ascii_list.
FREE l_ascii_list.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = l_ascii_list
listobject = l_abap_list
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
'Unable to convert list from rsbdcsub to ascii'
MESSAGE w368 WITH text-010.
ENDIF.
ENDIF. -
Processing the session in background
Hi experts,
I have created a BDC program in session method. Once i executed the program, it creates a session name.
Then i select the corresponding session name in SM35 and process it in background.
But i dont want to goto SM35 and process the session explicitely.
How to process the session in background without going to SM35 tcode?
Regards,
ShanthiHi shanti,
check with below code... but one point keep remember. when your trying to post a question check SDN and if your not succeeded then only post the question. so it will avoid the duplicate postings on the same topic i am right ?.
Hi,
Use this sample code
DATA: RUNTIME TYPE I. "Runtime
DATA: GROUP LIKE APQI-GROUPID, " Mappenname
BDCIMMED LIKE RFIPI-BDCIMMED, " nur BDC: sof. Abspielen
BDCSTRTDT LIKE TBTCJOB-SDLSTRTDT, "nur BDC: Startdatum
BDCSTRTTM LIKE TBTCJOB-SDLSTRTTM. "nur BDC: Startzeit
form mappe_abspielen_im_batch.
GET RUN TIME FIELD RUNTIME.
JOBNAME = 'RFEBFD00-FIEB'.
JOBNAME+14 = RUNTIME.
eak-point.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = JOBNAME
JOBGROUP = 'FIEB'
IMPORTING
JOBCOUNT = JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 01
INVALID_JOB_DATA = 02
JOBNAME_MISSING = 03.
IF SY-SUBRC NE 0.
MESSAGE E015 RAISING SESSION_NOT_PROCESSABLE.
ENDIF.
SUBMIT RSBDCSUB AND RETURN
USER SY-UNAME
VIA JOB JOBNAME NUMBER JOBCOUNT
with mappe = group
WITH MAPPE = BI-NAME
WITH VON = SY-DATUM
WITH BIS = SY-DATUM
WITH Z_VERARB = 'X'.
BDCSTRTDT = SY-DATUM.
BDCSTRTDT = SPACE.
BDCSTRTTM = SPACE.
BDCIMMED = 'X'.
bdcstrttm = runtime.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBNAME = JOBNAME
JOBCOUNT = JOBCOUNT
STRTIMMED = BDCIMMED
SDLSTRTDT = BDCSTRTDT
SDLSTRTTM = BDCSTRTTM
EXCEPTIONS
CANT_START_IMMEDIATE = 01
JOBNAME_MISSING = 02
JOB_CLOSE_FAILED = 03
JOB_NOSTEPS = 04
JOB_NOTEX = 05
LOCK_FAILED = 06.
IF SY-SUBRC NE 0.
MESSAGE E015 RAISING SESSION_NOT_PROCESSABLE.
ENDIF.
CLEAR BDCIMMED.
BDCSTRTDT = SPACE.
BDCSTRTTM = SPACE.
~lingannna -
How to handle the errors in BDC Session method
Hi All,
I am uploading Material Master (MM01) records using BDC Session Method.my problem is when i am running the program, all the error records are going to flat file.how can i correcting the error records and after correction how can i re-process the error records.tell me with example.
i have around 70,000 records in my flat file.Hi,
I am attaching few threads.Hope these will help you.
If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
and refer the link.
error correction in bdc session
regards
Madhu -
How to overcome view changes in bdc session method using recording ?
how to overcome view changes in bdc session method using recording ?
ex-for mm01 in recording if i selected views basic data1 and basic data2.
i seheduleded for background for after 3 days .
if any body changes views by selecting other views also.
how to overcome this with out programming ?
is there any settings ?Hi,
I am attaching few threads.Hope these will help you.
If there are any error records in session, all those error records will get poulated in log .SM35 and after the session is completed , u can see error records which can be corrected and reprocessed again
We have the structures BDCLD and BDCLM, which will capture the log details inthe session. Firstly, sesssion should be processed. After that log will be created. Then caputure the information into an internal table using BDCLM and BDCLD.
and refer the link.
error correction in bdc session
regards
Madhu -
LSMW-Error during processing of BDC session change to material master MM02
I have created an LSMW for changing material master data. I recorded MM02 and using the "select views" screen selected the accounting 2 view and entered the information in the fields on that screen requiring changes. I've set up all of the technical screens for the LSMW. However, when I process the BDC session with "display errors only", the program stops at the select view screen with an error message "Select at least one view". Any ideas how I can process through this screen so that the Accounting 2 screen opens in the BDC session? One further note, I set that selection as a constant in the field mapping and conversion rules screen. The field name recorded as KZSEL_05.
hi
one question how did you choose the view? i mean to ask by scrolling down using mouse or page down.
the scrolling by mouse is not recognized by recording and that may be the error. so whenever you have to go down in screen please use page down not scrolling at least in LSMW. -
How can we execute the BDC session in error mode through se38 programme
Dear Experts,
How can we execute the BDC session in error mode through se38 programme....
we can execute the session in the below 2 ways
1) Through SM35 we can process the session manually in foreground/Error mode or Background also.
2) through RSBDCSUB (standared Program) we can process the session in back ground.
But i want to process the session in foreground or Error mode..Do we have any standared program for process the session in foreground or error mode.
Please suggest.
Regards,
Bussa.Hi,
SAP was smart enough to provide this little program: RSBDCCTU
Sandra
Edited by: Sandra Rossi, 15 minutes later
Maybe the answer to your question is just to use CALL TRANSACTION ... USING ... (see the example in RSBDCCTU). You can also generate such a program using transaction SHDB -
I have a general doubt.
I have a report, which generates a session with only error records. In real time how they will process that session, If they have different data mismatches in each record means, how they will process that type of sessions.Hi Priya,
When there is a error in the data BDC generate a session for that. you can access that session using SM35. In real time all errored record are processed using SM35 by correcting the entries.
Regards,
Atish -
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. -
Error in BDC session processing
hi all,
I am running the BDC session method. while running the session the interface throws warning message. If it gives more than one warning message in background the session goes into error. is there any way to skip these and still continue the processing of session in backgroundPraveen,
By default all the warnings are suppressed irrespective of the number of warnings.
You must be encountering a error not a warning
Regards,
Ravi
Note : Please mark the helpful answers
Maybe you are looking for
-
I have a problem with xajax javascript in Mozilla just how to fix it
<blockquote>Locking duplicate thread.<br> Please continue here: [/questions/835757]</blockquote> I have a problem with xajax javascript in Mozilla just how to fix it
-
Not receiving eternal emails on eXchange 2010
I have eXchange 2010 on Hyper V for delivering email sitting on Server 2008 R2 I am able to send outgoing mail but I am not receiving anything from outside: this is for all accounts.
-
Which AC adapter do i use in India?
Hi, I have a Powerbook and want to use it in India. Mine runs on 110V and is made for flat pin sockets. In India the voltage is 220-240 V and the sockets are round shaped. Can anyone suggest the following - 1. Name of the AC adapter that can be used.
-
Hi All, I am facing the same issue while creating and accepting a service entry sheet via BAPI_ENTRYSHEET_CREATE in a report . I get a pop up message S001 (Buffer table not upto date) in ML81N. Though, it is not an error message it delays the further
-
E71 - Copy text to clipboard from from html reader...
I could not copy text to clipboard from - Web page, html readers, - Web feed reader - Email reader. (if I choose reply or forward, then I can copy text) How to do it? is almighty E71 unable to do it?