BDC _OPEN_GROUP session not opening
Hii All,
in my prog,
session not going into BDC_OPEN_GROUP.
y its not opening session.
its closing before opening the session.
Hi...
Can u plz paste ur Code.
So that it can be traced.
regards.
Similar Messages
-
BDC_INSERT, session not opened Error
Hi,
I have a BDC program to Add, Update and Delete a customer. If I do either Add, Update or Delete it is working fine. But if I have ADD and Update And Delete or any two of those it is giving me BDC_INSERT session not opened error. I have BDC_OPEN_GROUP, BDC_CLOSE_GROUP and BDC_INSERT.
Can someone please help me to resolve this error.
Thanks,
veni.
when 'UPDATE'.
DESCRIBE TABLE itab_output LINES lv_cnt.
DO lv_cnt TIMES.
lv_index = sy-index + 3.
READ LINE lv_index FIELD VALUE chk.
IF chk = 'X'.
READ TABLE itab_output INTO wa_index INDEX sy-index.
IF sy-subrc EQ 0.
wa_index-index = sy-index.
APPEND wa_index TO itab_output2.
CLEAR wa_index.
ENDIF.
ENDIF.
CLEAR chk.
ENDDO.
set pf-status 'NORM1'.
LOOP at itab_output2.
IF itab_output2-transpzone = 'ADDITION'.
MOVE itab_output2-name TO wa1-name.
MOVE itab_output2-name_2 TO wa1-name_2.
MOVE itab_output2-name_3 TO wa1-name_3.
MOVE itab_output2-name_4 TO wa1-name_4.
MOVE itab_output2-city TO wa1-city .
MOVE itab_output2-city_no TO wa1-city_no.
MOVE itab_output2-postl_cod1 TO wa1-postl_cod1.
MOVE itab_output2-transpzone TO wa1-transpzone.
MOVE itab_output2-street TO wa1-street.
MOVE itab_output2-str_suppl1 TO wa1-str_suppl1.
MOVE itab_output2-country TO wa1-country.
MOVE itab_output2-extens_1 TO wa1-extens_1.
PERFORM FORMAT_STORENO.
APPEND wa1 TO itab_output3.
CLEAR: wa1.
ELSEIF itab_output2-transpzone = 'CHANGE'.
MOVE itab_output2-name TO wa1-name.
MOVE itab_output2-name_2 TO wa1-name_2.
MOVE itab_output2-name_3 TO wa1-name_3.
MOVE itab_output2-name_4 TO wa1-name_4.
MOVE itab_output2-city TO wa1-city .
MOVE itab_output2-city_no TO wa1-city_no.
MOVE itab_output2-postl_cod1 TO wa1-postl_cod1.
MOVE itab_output2-transpzone TO wa1-transpzone.
MOVE itab_output2-street TO wa1-street.
MOVE itab_output2-str_suppl1 TO wa1-str_suppl1.
MOVE itab_output2-country TO wa1-country.
MOVE itab_output2-extens_1 TO wa1-extens_1.
PERFORM FORMAT_STORENO.
APPEND wa1 TO itab_output4.
CLEAR: wa1.
ELSEIF itab_output2-transpzone = 'DELETE'.
MOVE itab_output2-name TO wa1-name.
MOVE itab_output2-name_2 TO wa1-name_2.
MOVE itab_output2-name_3 TO wa1-name_3.
MOVE itab_output2-name_4 TO wa1-name_4.
MOVE itab_output2-city TO wa1-city .
MOVE itab_output2-city_no TO wa1-city_no.
MOVE itab_output2-postl_cod1 TO wa1-postl_cod1.
MOVE itab_output2-transpzone TO wa1-transpzone.
MOVE itab_output2-street TO wa1-street.
MOVE itab_output2-str_suppl1 TO wa1-str_suppl1.
MOVE itab_output2-country TO wa1-country.
MOVE itab_output2-extens_1 TO wa1-extens_1.
PERFORM FORMAT_STORENO.
APPEND wa1 TO itab_output5.
CLEAR: wa1.
endif.
endloop.
clear chk.
refresh itab_output2.
DESCRIBE TABLE itab_output3 LINES lv_cnt.
if lv_cnt <> 0.
perform add_shipto.
endif.
clear lv_cnt.
DESCRIBE TABLE itab_output4 LINES lv_cnt.
if lv_cnt <> 0.
perform change_shipto.
endif.
clear lv_cnt.
DESCRIBE TABLE itab_output5 LINES lv_cnt.
if lv_cnt <> 0.
perform delete_shipto.
endif.
clear lv_cnt.
endcase.
FORM FORMAT_STORENO.
IF itab_output2-storeno >= 1 AND itab_output2-storeno <= 9.
CONCATENATE '1012'
'00000'
itab_output2-storeno
INTO wa1-storeno.
ELSEIF itab_output2-storeno > 9 AND itab_output2-storeno < 100.
CONCATENATE '1012'
'0000'
itab_output2-storeno
INTO wa1-storeno.
ELSEIF itab_output2-storeno > 99 AND itab_output2-storeno < 1000.
CONCATENATE '1012'
'000'
itab_output2-storeno
INTO wa1-storeno.
ELSEIF itab_output2-storeno > 999 AND itab_output2-storeno < 10000.
CONCATENATE '1012'
'00'
itab_output2-storeno
INTO wa1-storeno.
ENDIF.
ENDFORM. " FORMAT_STORENO
FORM add_shipto.
loop at itab_output3.
MOVE '1012' TO WA_EDPAR-KUNNR.
MOVE 'WE' TO WA_EDPAR-PARVW.
MOVE itab_output3-name_4 TO WA_EDPAR-EXPNR.
MOVE itab_output3-storeno TO WA_EDPAR-INPNR.
INSERT INTO EDPAR VALUES WA_EDPAR.
CLEAR WA_EDPAR.
endloop.
IF gd_open <> gc_true.
m_grpid = 'ADD_SHIPTO'.
PERFORM open_bdc_session.
ENDIF.
LOOP AT itab_output3 INTO wa1.
lv_lzone = wa1-postl_cod1(3).
perform bdc_dynpro using 'SAPMF02D' '0107'.
perform bdc_field using 'BDC_CURSOR' 'RF02D-KTOKD'.
// BDC to add customer
PERFORM bdc_transaction USING gc_tcode2.
m_count = m_count + 1.
ENDLOOP.
IF sy-subrc = 0.
WRITE: /01 'Batch job created successfully',
/01 'Number of new records added', m_count.
ENDIF.
clear m_count.
IF gd_open = gc_true.
PERFORM close_bdc_session.
ENDIF.
ENDFORM. " add_shipto
FORM change_shipto.
loop at itab_output4.
UPDATE EDPAR SET expnr = itab_output4-name_4
WHERE kunnr = '0000001012' AND
inpnr = itab_output4-storeno.
endloop.
IF gd_open <> gc_true.
m_grpid = 'CHANGE_SHIPTO'.
PERFORM open_bdc_session.
ENDIF.
LOOP AT itab_output4 INTO wa1.
lv_lzone = wa1-postl_cod1(3).
perform bdc_dynpro using 'SAPMF02D' '0108'.
perform bdc_field using 'BDC_CURSOR' 'RF02D-D0125'.
// BDC to change customer
PERFORM bdc_transaction USING gc_tcode1.
m_count = m_count + 1.
ENDLOOP.
IF sy-subrc = 0.
WRITE: /01 'Batch job created successfully',
/01 'Number of records changed', m_count.
ENDIF.
clear m_count.
IF gd_open = gc_true.
PERFORM close_bdc_session.
ENDIF.
ENDFORM. " change_shipto
FORM delete_shipto.
loop at itab_output5.
DELETE FROM EDPAR
WHERE kunnr = '0000001012' AND
expnr = itab_output5-name_4 AND
inpnr = itab_output5-storeno.
endloop.
IF gd_open <> gc_true.
m_grpid = 'DELETE_SHIPTO'.
PERFORM open_bdc_session.
ENDIF.
LOOP AT itab_output5 INTO wa1.
perform bdc_dynpro using 'SAPMF02D' '0507'.
perform bdc_field using 'BDC_CURSOR' 'RF02D-SPART'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'RF02D-KUNNR' wa1-storeno.
perform bdc_field using 'RF02D-VKORG' '300'.
perform bdc_field using 'RF02D-VTWEG' '20'.
perform bdc_field using 'RF02D-SPART' '01'.
perform bdc_dynpro using 'SAPMF02D' '0520'.
perform bdc_field using 'BDC_CURSOR' 'KNA1-LOEVM'.
perform bdc_field using 'BDC_OKCODE' '=UPDA'.
perform bdc_field using 'KNA1-LOEVM' 'X'.
PERFORM bdc_transaction USING gc_tcode3.
m_count = m_count + 1.
ENDLOOP.
IF sy-subrc = 0.
WRITE: /01 'Batch job created successfully',
/01 'Number of records deleted', m_count.
ENDIF.
clear m_count.
IF gd_open = gc_true.
PERFORM close_bdc_session.
ENDIF.
ENDFORM. " delete_shipto
FORM open_bdc_session.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
client = sy-mandt
group = m_grpid
keep = 'X'
user = sy-uname.
IF sy-subrc <> 0.
MESSAGE e208(00) WITH 'Session open error'.
ELSE.
gd_open = gc_true.
ENDIF.
ENDFORM. " open_bdc_session
FORM close_bdc_session.
IF gd_open = gc_true.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXPORTING
client = sy-mandt
group = m_grpid
keep = 'X'
user = sy-uname.
ENDIF.
ENDFORM. " close_bdc_session
FORM bdc_dynpro USING p_program
p_screen.
CLEAR: itab_bdcdata.
itab_bdcdata-program = p_program.
itab_bdcdata-dynpro = p_screen.
itab_bdcdata-dynbegin = gc_true.
APPEND itab_bdcdata.
ENDFORM. " bdc_dynpro
FORM bdc_field USING p_fieldname
p_value.
CLEAR itab_bdcdata.
itab_bdcdata-fnam = p_fieldname.
itab_bdcdata-fval = p_value.
APPEND itab_bdcdata.
ENDFORM. " BDC_FIELD
FORM bdc_transaction USING p_tcode.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
tcode = p_tcode
TABLES
dynprotab = itab_bdcdata.
REFRESH itab_bdcdata.
CLEAR: itab_bdcdata.
ENDFORM. " bdc_transactionThank you Rob.
I just added this in BDC_CLOSE_GROUP, and it worked.
IF sy-subrc = 0.
gd_open = ' '.
ENDIF.
In BDC_OPEN_GROUP if gd_open = ' ', then only it opens a new session.
Thanks,
Veni.
Edited by: veni reddy on Feb 8, 2008 8:52 PM -
BDC_INSERT, session not open
Hi All,
I was executing a BDC and got this error, 'BDC_INSERT, session not open'.
Please help me how to correct it.
Thanks
Veni.Hi
AT the end you have to close the session by fm BDC_CLOSE_GROUP
Your flow should be:
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = E_GROUP
USER = E_USER
KEEP = E_KEEP.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = _TCODE
TABLES
DYNPROTAB = BDCDATA.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
Max -
Hey when i open a session from the actual folder it sometimes opens the last backup session it saved and when it opens that logic says it cant find half of my samples. If i open logic and then go to open recent i dont get this problem.
The more i read about i7 macs and logic the more i think that they just dont like each other....?????
-
fire fox opens with tabs from preveous session not home page in tools under options and tab general I have start up with home page but all tabs from previous session open instead
It is possible that there is a problem with the files [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
* Help > Troubleshooting Information > Profile Directory: Open Containing Folder
If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
Deleting sessionstore.js will cause App Tabs and Tab Groups to get lost, so you will have to create them again (make a note).
See:
* http://kb.mozillazine.org/Session_Restore -
Firefox will not open my previous session
Firefox 4 will not open any previous session once I shut down. I can have say 5 tabs open, close firefox, and reopen it and the session was saved. If I have those same 5 tabs open and shut down, then turn on my computer the next day, I can click on firefox, it will highlight the icon, and the highlight will disappear after about 5 seconds, and then I have to click it again, and it will open a totally new session. How do I fix this?
Make sure that you do not use [[Clear Recent History]] to clear the "Browsing History" if Firefox is closed.
-
Transaction iView(from remote source) does not open a new SAP session
Hi All,
We are on portal 7.4 and are calling a transaction from ECC system. Within the transaction we have a button which displays graphs based on the output of the transaction. Since we are calling this transaction from portal, a new session does not open after clicking on this button.
In order to enable a new session, I have changed the configuration for 'disable new session buttons in SAP GUI' to false yet the new SAP session does not open. I have also verified the webgui setting and ensured that we do not have '~singletransaction' maintained, yet we are unable to enable the new session. Could you kindly suggest on how I can get this button to function?
Additional inputs:
- Referred to note 125814 for changing the new sessions value.
- Tried changing the iview type to 'SAP GUI for window' from SAP HTML type(which was default).
- In case I type '/o' in the command box for SAP, it gives me a 'maximum sessions reached' message, but this message does not come when I click on this button. In fact, nothing happens after I click on the button.
I still think there might be a possibility to enable this, however, I seek your inputs on this.
Awaiting response...
Warm Regards,
VinayHi Harini,
thanks for your answer!
I can tell you that the same command used from the SAP Client open a new session with the same transaction...
Is strange that from the portal it has a different behaviour...
Best Regards -
How can i restrict a user not open more than 3 sessions in database
how can i restrict a user not open more than 3 sessions in database.For this i have already create a profile and set CONCURRENT_SESSIONS=3 and assing that profile to user but the problem is there.
You will simply need to use the following parameter in your CREATE PROFILE syntax.
CREATE PROFILE normal_user
LIMIT SESSIONS_PER_USER 2;
but the resource limits set for a profile are enforced only when you enable resource limitation for the associated database.
you could do this either by having an initialization paramater which will invoke as soon as the database starts or try using ALTER SYSTEM command -
Updated now will not open at all or restore session
I recently updated firefox. Since updating now it will not open at all. It says it is not responding and wont restore a session or anything. All my important bookmarks was on this browser. I have tried deleteing and re-installing. I have also tried restoring the older version I have been using that was installed in March. What can I do to solve this problem. I dont like using Internet Explorer.
A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
See:
* https://support.mozilla.com/kb/Server+not+found
* https://support.mozilla.com/kb/Firewalls -
LR 6 doe not open on Mac, chat session does not work.
I originally installed LR5, stand alone. Then I went to the CC, with the LR/PS package. I just installed LR6 via CC, but it will not open. I get a flash of the title screen, but then it immediately closes. I have tried Chat, but it seems to sit and do nothing. I never get a chat session. 1) how do I get LR6 via CC to open? 2) It appears I have two copies of LR on my macbook will LR6 automatically find my LR5 photos?
FYI, I have tried logging out and then back in.
-
hai
can anyone post me bdc using session method plzHi,
ABAP BDC SESSION METHOD SAMPLE CODE
pool of form routines
include zmppn001.
Define BDC Table Structure
data: begin of itab_bdc_tab occurs 0.
include structure bdcdata.
data: end of itab_bdc_tab.
Input record layout of Leagcy File
data: begin of itab_xcel occurs 0,
matnr(18) type c,
werks(4) type c,
alnag(2) type c,
verid(4) type c,
text1(40) type c,
bstmi like mkal-bstmi,
bstma like mkal-bstma,
adatu(10) type c,
bdatu(10) type c,
stlal(2) type c,
stlan(1) type c,
serkz(1) type c,
mdv01(8) type c,
elpro(4) type c,
alort(4) type c,
end of itab_xcel.
data: begin of lt_pp04_cache occurs 0,
matnr like itab_xcel-matnr,
werks like itab_xcel-werks,
alnag like itab_xcel-alnag,
plnnr like mapl-plnnr,
arbpl like crhd-arbpl,
ktext like crtx-ktext,
end of lt_pp04_cache.
data: v_ssnnr(4) type n,
v_lines_in_xcel like sy-tabix,
v_ssnname like apqi-groupid,
v_trans_in_ssn type i,
wa_xcel LIKE itab_xcel,
l_tabix like sy-tabix,
v_matnr like rc27m-matnr,
v_plnnr like mapl-plnnr,
v_plnal like mapl-plnal,
v_tcode like sy-tcode value 'C223',
v_plnty like plas-plnty value 'R',
v_objty like crhd-objty value 'A',
v_plpo_steus like plpo-steus value 'PP04',
v_verwe like crhd-verwe value '0007'.
Parameters
selection-screen: skip 3.
selection-screen: begin of block 1 with frame.
parameters: p_name like rlgrap-filename
default 'C:\My Documents\InputFile.txt'
obligatory,
bdc session name prefix
p_bdcpfx(6) default 'ZPVCRT'
obligatory,
number for transction per BDC session
p_trnssn type i
default 2000 obligatory,
retain the BDC session after successfull execution
p_keep like apqi-qerase
default 'X',
user who will be executing BDC session
p_uname like apqi-userid
default sy-uname
obligatory.
selection-screen: end of block 1.
possible entry list (F4 dropdown) for input file name
at selection-screen on value-request for p_name.
*-SELECT FILE FROM USERS LOCAL PC
call function 'WS_FILENAME_GET'
exporting
DEF_FILENAME = ' '
def_path = 'C:\Temp\'
mask = ',.,..'
mode = 'O'
title = 'Select File '(007)
importing
filename = p_name
RC =
exceptions
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5.
if sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
begin the show
start-of-selection.
read data from input file
perform transfer_xcel_to_itab.
loop at itab_xcel.
hang on to xcel line num
l_tabix = sy-tabix.
each line in the xcel file marks begining of new prod.version defn
if num-of-trnas-in-session = 0, create new BDC session
if v_trans_in_ssn is initial.
perform bdc_session_open.
endif.
begin new bdc script for rtg create trans
fill in bdc-data for prod.version maintenance screens
perform bdc_build_script.
insert the bdc script as a BDC transaction
perform bdc_submit_transaction.
keep track of how many BDC transactions were inserted in the BDC
session
add 1 to v_trans_in_ssn.
if the user-specified num of trans in BDC session is reached OR
if end of input file is reached, close the BDC session
if v_trans_in_ssn = p_trnssn or
l_tabix = v_lines_in_xcel.
perform bdc_session_close.
clear v_trans_in_ssn.
endif.
endloop.
top-of-page.
call function 'Z_HEADER'
EXPORTING
FLEX_TEXT1 =
FLEX_TEXT2 =
FLEX_TEXT3 =
FORM TRANSFER_XCEL_TO_ITAB *
Transfer Xcel Spreadsheet to SAP Internal Table *
form transfer_xcel_to_itab.
Read the tab-delimited file into itab
call function 'WS_UPLOAD'
exporting
filename = p_name
filetype = 'DAT'
IMPORTING
filelength = flength
tables
data_tab = itab_xcel
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_table_width = 4
invalid_type = 5
no_batch = 6
unknown_error = 7
others = 8.
if sy-subrc = 0.
sort the data
sort itab_xcel by matnr werks.
clear v_lines_in_xcel.
if no data in the file - error out
describe table itab_xcel lines v_lines_in_xcel.
if v_lines_in_xcel is initial.
write: / 'No data in input file'.
stop.
endif.
else.
if file upload failed - error out
write: / 'Error reading input file'.
stop.
endif.
endform.
FORM BDC_SESSION_OPEN *
Open BDC Session *
form bdc_session_open.
create bdc session name = prefix-from-selectn-screen + nnnn
add 1 to v_ssnnr.
concatenate p_bdcpfx v_ssnnr into v_ssnname.
open new bdc session
call function 'BDC_OPEN_GROUP'
exporting
client = sy-mandt
group = v_ssnname
keep = p_keep
user = p_uname
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.
endform.
FORM BDC_BUILD_SCRIPT *
Build BDC *
form bdc_build_script.
data: l_arbpl like crhd-arbpl,
l_text1 like mkal-text1,
l_mdv01 like mkal-mdv01,
l_mapl like mapl.
clear bdc-data itab - begin of new bdc transaction
clear itab_bdc_tab.
refresh itab_bdc_tab.
read material cross reference tables to determine sap part#
clear : v_matnr, v_plnnr, v_plnal.
perform read_matnr_cross_ref using itab_xcel-matnr
itab_xcel-werks
changing v_matnr.
determine the version description to use
if itab_xcel-text1 is initial.
l_text1 = itab_xcel-verid.
else.
l_text1 = itab_xcel-text1.
endif.
determine the routing group# and group ctr# to use
perform read_routing .
determine the production line to use
if itab_xcel-mdv01 is initial.
if not provided in the file then:
prod line = work ctr on the last PP04 op of the rtg determined above
perform read_wc_on_last_pp04 using v_plnnr v_plnal
changing l_mdv01.
NOTE: when executing the above form\routine, if v_plnnr is initial
or v_plnal is initial, THEN l_mdv01 will automatically be
returned blank (ie initial)
else.
l_mdv01 = itab_xcel-mdv01.
endif.
build bdc script
perform bdc_build_script_record
fill in initial screen
using: 'X' 'SAPLCMFV' '1000',
' ' 'BDC_OKCODE' '=ENTE',
' ' 'MKAL-WERKS' itab_xcel-werks,
' ' 'MKAL-MATNR' v_matnr,
' ' 'MKAL_ADMIN-DISPO' space,
' ' 'MKAL-PLNNR' space,
' ' 'MKAL_ADMIN-STTAG' space,
' ' 'MKAL-PLNNG' space,
' ' 'MKAL-MDV01' space,
' ' 'MKAL-PLNNM' space,
click create button on initial screen and go to detail screen
'X' 'SAPLCMFV' '1000',
' ' 'BDC_OKCODE' '=CREA',
fill in the detail screen and go back to initial screen
'X' 'SAPLCMFV' '2000',
' ' 'BDC_OKCODE' '=CLOS',
' ' 'MKAL_EXPAND-MATNR' v_matnr,
' ' 'MKAL_EXPAND-VERID' itab_xcel-verid,
' ' 'MKAL_EXPAND-TEXT1' l_text1,
' ' 'MKAL_EXPAND-BSTMI' itab_xcel-bstmi,
' ' 'MKAL_EXPAND-BSTMA' itab_xcel-bstma,
' ' 'MKAL_EXPAND-ADATU' itab_xcel-adatu,
' ' 'MKAL_EXPAND-BDATU' itab_xcel-bdatu,
' ' 'MKAL_EXPAND-PLTYG' v_plnty,
' ' 'MKAL_EXPAND-PLNNG' v_plnnr,
' ' 'MKAL_EXPAND-ALNAG' v_plnal,
' ' 'MKAL_EXPAND-STLAL' itab_xcel-stlal,
' ' 'MKAL_EXPAND-STLAN' itab_xcel-stlan,
' ' 'MKAL_EXPAND-SERKZ' itab_xcel-serkz,
' ' 'MKAL_EXPAND-MDV01' l_mdv01,
' ' 'MKAL_EXPAND-ELPRO' itab_xcel-elpro,
' ' 'MKAL_EXPAND-ALORT' itab_xcel-alort,
save the production version from initial screen
'X' 'SAPLCMFV' '1000',
' ' 'BDC_OKCODE' '=SAVE'.
endform.
FORM BDC_SUBMIT_TRANSACTION *
Submit BDC Session *
form bdc_submit_transaction.
Load BDC script as a trqansction in BDC session
call function 'BDC_INSERT'
exporting
tcode = v_tcode
tables
dynprotab = itab_bdc_tab
exceptions
internal_error = 01
not_open = 02
queue_error = 03
tcode_invalid = 04.
endform.
FORM BDC_BUILD_SCRIPT_RECORD *
form bdc_build_script_record using dynbegin name value.
clear itab_bdc_tab.
if dynbegin = 'X'.
move: name to itab_bdc_tab-program,
value to itab_bdc_tab-dynpro,
'X' to itab_bdc_tab-dynbegin.
else.
move: name to itab_bdc_tab-fnam,
value to itab_bdc_tab-fval.
shift itab_bdc_tab-fval left deleting leading space.
endif.
append itab_bdc_tab.
endform.
FORM BDC_SESSION_CLOSE *
Close BDC Session *
form bdc_session_close.
close the session
call function 'BDC_CLOSE_GROUP'
exceptions
not_open = 1
queue_error = 2
others = 3.
skip 2.
if sy-subrc ne 0.
write: / 'Error Closing BDC Session ' , 'RETURN CODE: ', sy-subrc.
else.
write : / 'Session created:', v_ssnname,
50 '# of transactions:', v_trans_in_ssn.
endif.
endform.
*& Form read_routing_cache
*FORM read_routing_cache USING pi_matnr
pi_werks
pi_alnag
pi_verid
pi_mdv01.
DATA: BEGIN OF lt_plpo OCCURS 0,
vornr LIKE plpo-vornr,
objty LIKE crhd-objty,
objid LIKE crhd-objid,
arbpl LIKE crhd-arbpl,
END OF lt_plpo,
l_mapl_plnnr LIKE mapl-plnnr.
determine the routing group#
CLEAR lt_pp04_cache.
chk if its in the cache first, if not then get it from MAPL table
and put it in the cache
READ TABLE lt_pp04_cache WITH KEY matnr = pi_matnr
werks = pi_werks
alnag = pi_alnag.
IF sy-subrc = 0.
do nothing - lt_pp04_cache header line has rtg#
ELSE.
get the routing group # from MAPL
SELECT plnnr INTO l_mapl_plnnr
FROM mapl UP TO 1 ROWS
WHERE matnr = pi_matnr AND
werks = pi_werks AND
plnty = 'R' AND
plnal = pi_alnag AND
loekz = space.
ENDSELECT.
put it in the cache internal table
IF NOT l_mapl_plnnr IS INITIAL.
lt_pp04_cache-matnr = pi_matnr.
lt_pp04_cache-werks = pi_werks.
lt_pp04_cache-alnag = pi_alnag.
lt_pp04_cache-plnnr = l_mapl_plnnr.
APPEND lt_pp04_cache.
ENDIF.
ENDIF.
if the rtg# was determined AND
-- the work center was not determined yet AND
-- work center was really needed for this line in the input file
then
-- read the work center from last PP04 operation on the routing
-- update the cache accordingly
IF NOT lt_pp04_cache-plnnr IS INITIAL AND
lt_pp04_cache-arbpl IS INITIAL AND
( pi_verid IS INITIAL OR
pi_mdv01 IS INITIAL ).
read the last PP04 operation
CLEAR lt_plpo.
REFRESH lt_plpo.
SELECT vornr eobjty eobjid e~arbpl
INTO CORRESPONDING FIELDS OF TABLE lt_plpo
FROM plas AS b
INNER JOIN plpo AS c
ON bplnty = cplnty AND
bplnnr = cplnnr AND
bzaehl = czaehl
INNER JOIN crhd AS e
ON carbid = eobjid
WHERE b~plnty = v_plnty AND
b~plnnr = lt_pp04_cache-plnnr AND
b~plnal = lt_pp04_cache-alnag AND
c~loekz = space AND
c~steus = v_plpo_steus AND
e~objty = v_objty AND
e~werks = lt_pp04_cache-werks AND
e~verwe = v_verwe.
SORT lt_plpo BY vornr DESCENDING.
READ TABLE lt_plpo INDEX 1.
IF NOT lt_plpo-arbpl IS INITIAL.
lt_pp04_cache-arbpl = lt_plpo-arbpl.
read work center description
SELECT SINGLE ktext INTO lt_pp04_cache-ktext
FROM crtx WHERE objty = lt_plpo-objty AND
objid = lt_plpo-objid AND
spras = sy-langu.
the following read will get the index of the correct record to be
updated in the cache
READ TABLE lt_pp04_cache
WITH KEY matnr = pi_matnr
werks = pi_werks
alnag = pi_alnag.
MODIFY lt_pp04_cache
INDEX sy-tabix
TRANSPORTING arbpl ktext.
ENDIF.
ENDIF.
*ENDFORM. " read_last_pp04_operation_cache
*& Form read_routing
form read_routing.
data: begin of lt_mapl occurs 0,
plnnr like mapl-plnnr,
plnal like mapl-plnal,
end of lt_mapl,
l_arbpl like crhd-arbpl.
get all the rtg# and grp ctr# from MAPL
select plnnr plnal
into corresponding fields of table lt_mapl
from mapl
where matnr = v_matnr and
werks = itab_xcel-werks and
plnty = v_plnty and "Rate Routing
loekz = space. "with del flag = OFF
sort lt_mapl by plnal.
if not itab_xcel-verid is initial.
if the verid=0001 then use the 1st good rtg-grp# and grp-ctr#
if itab_xcel-verid = '0001'.
read table lt_mapl index 1.
v_plnnr = lt_mapl-plnnr.
v_plnal = lt_mapl-plnal.
else.
if the verid<>0001 then use the rtg-grp# and grp-ctr# of the routing
whose work center on the last PP04 operation matches the given verid
loop at lt_mapl.
clear l_arbpl.
get the work center from the last PP04 operation
perform read_wc_on_last_pp04 using lt_mapl-plnnr
lt_mapl-plnal
changing l_arbpl.
if itab_xcel-verid = l_arbpl.
v_plnnr = lt_mapl-plnnr.
v_plnal = lt_mapl-plnal.
exit.
endif.
endloop.
endif.
else.
do nothing
endif.
For version IDs that are other then '0000' or 'ZWIP' :--
if itab_xcel-verid NE '0000' and
itab_xcel-verid NE 'ZWIP'.
if routing group# or group counter was not determined, make the
valid-to date 99/99/9999 so that the BDC, on execution, errors out.
if v_plnnr is initial or
v_plnal is initial.
itab_xcel-bdatu = '99/99/9999'.
endif.
endif.
determine the routing group#
CLEAR lt_pp04_cache.
chk if its in the cache first, if not then get it from MAPL table
and put it in the cache
READ TABLE lt_pp04_cache WITH KEY matnr = pi_matnr
werks = pi_werks
alnag = pi_alnag.
IF sy-subrc = 0.
do nothing - lt_pp04_cache header line has rtg#
ELSE.
get the routing group # from MAPL
put it in the cache internal table
IF NOT l_mapl_plnnr IS INITIAL.
lt_pp04_cache-matnr = pi_matnr.
lt_pp04_cache-werks = pi_werks.
lt_pp04_cache-alnag = pi_alnag.
lt_pp04_cache-plnnr = l_mapl_plnnr.
APPEND lt_pp04_cache.
ENDIF.
ENDIF.
if the rtg# was determined AND
-- the work center was not determined yet AND
-- work center was really needed for this line in the input file
then
-- read the work center from last PP04 operation on the routing
-- update the cache accordingly
IF NOT lt_pp04_cache-plnnr IS INITIAL AND
lt_pp04_cache-arbpl IS INITIAL AND
( pi_verid IS INITIAL OR
pi_mdv01 IS INITIAL ).
read the last PP04 operation
CLEAR lt_plpo.
REFRESH lt_plpo.
SELECT vornr eobjty eobjid e~arbpl
INTO CORRESPONDING FIELDS OF TABLE lt_plpo
FROM plas AS b
INNER JOIN plpo AS c
ON bplnty = cplnty AND
bplnnr = cplnnr AND
bzaehl = czaehl
INNER JOIN crhd AS e
ON carbid = eobjid
WHERE b~plnty = v_plnty AND
b~plnnr = lt_pp04_cache-plnnr AND
b~plnal = lt_pp04_cache-alnag AND
c~loekz = space AND
c~steus = v_plpo_steus AND
e~objty = v_objty AND
e~werks = lt_pp04_cache-werks AND
e~verwe = v_verwe.
SORT lt_plpo BY vornr DESCENDING.
READ TABLE lt_plpo INDEX 1.
IF NOT lt_plpo-arbpl IS INITIAL.
lt_pp04_cache-arbpl = lt_plpo-arbpl.
read work center description
SELECT SINGLE ktext INTO lt_pp04_cache-ktext
FROM crtx WHERE objty = lt_plpo-objty AND
objid = lt_plpo-objid AND
spras = sy-langu.
the following read will get the index of the correct record to be
updated in the cache
READ TABLE lt_pp04_cache
WITH KEY matnr = pi_matnr
werks = pi_werks
alnag = pi_alnag.
MODIFY lt_pp04_cache
INDEX sy-tabix
TRANSPORTING arbpl ktext.
ENDIF.
ENDIF.
endform. " read_last_pp04_operation_cache
*& Form read_wc_on_last_pp04
form read_wc_on_last_pp04 using pi_plnnr
pi_plnal
changing pe_arbpl.
data: begin of lt_plpo occurs 0,
vornr like plpo-vornr,
objty like crhd-objty,
objid like crhd-objid,
arbpl like crhd-arbpl,
end of lt_plpo.
get all the PP04 operations for the given rtg# & grp-ctr#
select vornr eobjty eobjid e~arbpl
into corresponding fields of table lt_plpo
from plas as b
inner join plpo as c
on bplnty = cplnty and
bplnnr = cplnnr and
bzaehl = czaehl
inner join crhd as e
on carbid = eobjid
where b~plnty = v_plnty and "Rate Routing
b~plnnr = pi_plnnr and
b~plnal = pi_plnal and
c~loekz = space and "Oper Del Flag = OFF
c~steus = v_plpo_steus and "PP04
e~objty = v_objty. "WC Obj Type = 'A'
read the last operation
sort lt_plpo by vornr descending.
read table lt_plpo index 1.
pe_arbpl = lt_plpo-arbpl.
endform.
Reward Points if useful
Raghunath.S
9986076729 -
recently when opening a new browser, everything Is using and closed during my last session will open
multiple widows will open and whatever tabs were open per respective windows will open and not per tools/options/startup/homepage
this has never happened until just recently and nothing else seems to have changed nor has any new programs etc been loaded or changedYou can check if you have a user.js file in the Firefox profile folder that sets the <b>browser.sessionstore.resume_session_once</b> pref to true.
*http://kb.mozillazine.org/browser.sessionstore.resume_session_once
You can use this button to go to the currently used Firefox profile folder:
*Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
Note that Windows hides some file extensions by default.
Among them are .html and .ini and .js and .txt, so you may only see file name without file extension.
You can see the real file type (file extension) in the properties of the file via the right-click context menu in Windows Explorer.
You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox profile folder that store session data.
*Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
*http://kb.mozillazine.org/Profile_folder_-_Firefox
*http://kb.mozillazine.org/Multiple_profile_files_created
Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible). -
Why can I not open a new window but I can open new tabs in V3.6.16?
I am running Firefox 3.6.16 on both my PC and my laptop. The program works fine on my PC, I can open both new windows and new tabs. However, on my laptop I can not open a new window. Tabs open just fine, but when I try to open a new window nothing happens. Also, when I close the program after trying to open a new window the program is still running but I have no Firefox window to work in and therefore have to go through the Task Manager to end the program. And when I re-open it, I get asked if I want to restore the session or start a new session. Is there a way to
'''Un-install''' the '''''Ask Toolbar''''' until Ask fixes the problem with their toolbar:
*http://support.mozilla.com/en-US/kb/Uninstalling+add-ons
*http://support.mozilla.com/en-US/kb/Cannot%20uninstall%20an%20add-on -
Firefox will not open old tabs
My computer crashed last evening and on restarting firefox, it goes to a new page without any of the old tabs available. Going under history has all of the options regarding restoring recently closed windows greyed out.
I did confirm that under preferences it is set to open previous tabs on starting firefox.
I have had the sessionstore.js file get corrupted previously. Looking in the profile folder showed the sessionstore.js to be a 1k file. So my first instinct was to just restore that file, and fortunately, there is a sessionstore.bak file with a time late last PM, so that file should still contain my last session.
I made a copy of the sessionstore.bak file and renamed it to sessionstore.js, but firefox still opens with a fresh session. I had the windows explorer (i.e. file manager) window open and as firefox was starting, the sessionstore.js got clobbered back to a 1k file suggesting the firefox is clearing the last session on opening. I tried restoring sessionstore.js from sessionstore.bak another time and making sessionstore.js read only, but firefox still will not revert back to the previous browsing session; instead it creates a new file called sessionstore.js.tmp.
I'm at a loss as to how to get my old browsing session back. I'm still using firefox V28.0. I haven't upgraded to V29 due to not wanting to lose the ability to export tabs as reported in the reviews of the android version of V29. Operating system is Win 7 SP1.If Firefox won't read the file when it's named sessionstore.js, it may have a structural problem. In that case, a little surgery might be needed, but it's hard to know what to suggest without more information.
Could try one of the data mining techniques in these posts to rescue the URLs from the sessionstore.js or sessionstore.bak file:
* Using Firefox's Browser Console (formerly known as Error Console): https://support.mozilla.org/questions/969046#answer-471950
* Using Firefox developer tool "Scratchpad": http://forums.mozillazine.org/viewtopic.php?f=38&t=622036&start=60&p=12098147#p12098147
* Using a third party website: https://firefox-session-restore.herokuapp.com/ -
Hi
We are using 10.1.3.4 SOA n JDev. The MWP files are not opening in Jdev and while opening the project we are getting errors with the following log:
java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String
at oracle.toplink.addin.manager.MWJDeveloperMediator.openTopLinkProject(MWJDeveloperMediator.java:328)
at oracle.toplink.addin.manager.MWJDeveloperMediator.openTopLinkProjects(MWJDeveloperMediator.java:271)
at oracle.toplink.addin.appnav.TopLinkProjectChangeListener.projectOpened(TopLinkProjectChangeListener.java:93)
at oracle.ide.model.Project$StorageListener.fireProjectOpened(Project.java:1168)
at oracle.ide.model.Project$StorageListener.mav$fireProjectOpened(Project.java:1135)
at oracle.ide.model.Project$NL.nodeOpened(Project.java:1127)
at oracle.ide.model.Node.fireNodeOpened(Node.java:1139)
at oracle.ide.model.Node.open(Node.java:573)
at oracle.ide.model.Node.ensureOpen(Node.java:976)
at oracle.ide.model.DataContainer$2.run(DataContainer.java:147)
at oracle.ide.model.Node.runWhileSynchronized(Node.java:809)
at oracle.ide.model.DataContainer.getSharedPropertiesOnly(DataContainer.java:152)
at oracle.ide.model.Project.getPropertiesImpl(Project.java:1097)
at oracle.ide.model.Project.getProperties(Project.java:323)
at oracle.ide.model.ProjectContent.getInstance(ProjectContent.java:122)
at oracle.ide.model.ContentLevel.initChildren(ContentLevel.java:88)
at oracle.ide.model.ContentSetFilter.initChildren(ContentSetFilter.java:28)
at oracle.ide.model.ContentFilter.getChildrenImpl(ContentFilter.java:121)
at oracle.ide.model.ContentFilter.getChildren(ContentFilter.java:64)
at oracle.ideimpl.explorer.BaseTreeExplorer.addChildren(BaseTreeExplorer.java:360)
at oracle.ideimpl.explorer.BaseTreeExplorer.open(BaseTreeExplorer.java:872)
at oracle.ideimpl.explorer.BaseTreeExplorer$2.run(BaseTreeExplorer.java:1788)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.lang.ClassCastException: java.lang.String
at oracle.toplink.mappings.foundation.AbstractCompositeCollectionMapping.valueFromRow(AbstractCompositeCollectionMapping.java:727)
at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1045)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:244)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:525)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:381)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObjectsInto(ObjectBuilder.java:677)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.buildObjectsFromRows(DatabaseQueryMechanism.java:142)
at oracle.toplink.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:483)
at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:812)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:780)
at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.valueFromQuery(NoIndirectionPolicy.java:262)
at oracle.toplink.mappings.ForeignReferenceMapping.valueFromRow(ForeignReferenceMapping.java:1151)
at oracle.toplink.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1045)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:244)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:525)
at oracle.toplink.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:381)
at oracle.toplink.queryframework.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:456)
at oracle.toplink.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:424)
at oracle.toplink.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:812)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:780)
at oracle.toplink.queryframework.ReadObjectQuery.execute(ReadObjectQuery.java:388)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:950)
at oracle.toplink.publicinterface.Session.readObject(Session.java:2591)
at oracle.toplink.workbench.ui.WorkbenchSession.getMWProjectNamed(WorkbenchSession.java:76)
at oracle.toplink.addin.persistence.MWJDeveloperPersistence.open(MWJDeveloperPersistence.java:234)
at oracle.toplink.addin.manager.MWJDeveloperMediator.openTopLinkProject(MWJDeveloperMediator.java:323)
... 28 more
Please provide inputs for the resolution of this as the DB Adapter wizards are not showing proper configuration and we want to do some changes in the DB adapter setup.
ThanksBetter post this on the SOA Suite forum.
Is this something that happens on various laptops - or just on one?
Maybe you are looking for
-
I need to download this: (http://support.apple.com/kb/DL788) because my macbook wont turn on unless its charged. I did all the resets like VPRAM, SMC, and I forgot the other one. My pack thingy is 0002 and it says that if its 0003 then you dont need
-
How to Select Database Path via labview
Hello gurus........... I am new user in labview. I want read and write in database through labivew . I have done read and write program. Now I want choose database storage path through labview . I tried differnt ways but I couldn't. First read an
-
Primary Key Migration - Hierarchical Structures
Hi, I'm involved in looking at a migration of a hierarchical database to ORACLE. For some table types the primary keys at the top of the hierarchy are compound ones and these need to be migrated to the next level of hierarchy. At the next level of hi
-
Aaa- failing back to local user
I'm testing this configuration on a CAT OS switch. I want to be able to failback to local login (local username and password if TACACS server fails) but in my case it is taking me to console prompt instead, can someone tell me if I 'm doing something
-
Delivery address in PO line item
Hi Friends, Need your inputs/ suggestions . THe delivery address in PO line item is taken from plant / Sloc details . If this text is changed , the changed details should be picked / outputted (and not the data / Master data of plant / Sloc ) is the