Session problem in BDC
Hello Experts,
I am doing BDC Session but it gives the error ' BDC_OPEN_GROUP , Create session ABC . NOT Allowed , as last session is still active '.
Actually the BDC i m using and upload the data by Call transaction successfully upload the data . But with session i got this error' BDC_OPEN_GROUP , Create session ABC . NOT Allowed , as last session is still active '.
please tell me how to solve this error.
regards
kamal
Yeah , this is my program .
report ZSESSION111
no standard page heading line-size 255.
data: begin of it_edu occurs 0,
id like zedudata-subid,
name like zedudata-name,
end of it_edu.
data: bdcdata1 like bdcdata occurs 0 with header line.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = ' '
FILENAME = ' '
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_edu
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.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = 'zsession111'
HOLDDATE = FILLER8
KEEP = 'X'
USER = sy-uname
RECORD = FILLER1
PROG = sy-cprog
DCPFM = '%'
DATFM = '%'
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.
loop at it_edu.
refresh bdcdata1.
perform mapping.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'SE11'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = bdcdata1
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.
endloop.
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.
include bdcrecx1.
start-of-selection.
form mapping.
perform open_group.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=EDIT'.
perform bdc_field using 'RSRD1-TBMA'
'X'.
perform bdc_field using 'RSRD1-TBMA_VAL'
'ZEDUDATA'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_CURSOR'
'DD02D-TABCLTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=WB_DISP_EDIT_TOGGLE'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_CURSOR'
'DD02D-TABCLTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=WB_DISP_EDIT_TOGGLE'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_CURSOR'
'DD02D-DDTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=TDED'.
perform bdc_field using 'DD02D-DDTEXT'
'educational data'.
loop at it_edu.
perform bdc_dynpro using '/1BCDWB/DBZEDUDATA' '0101'.
perform bdc_field using 'BDC_CURSOR'
'ZEDUDATA-NAME'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'ZEDUDATA-SUBID'
it_edu-id.
perform bdc_field using 'ZEDUDATA-NAME'
it_edu-name.
endloop.
perform bdc_dynpro using '/1BCDWB/DBZEDUDATA' '0101'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'ZEDUDATA-SUBID'.
perform bdc_dynpro using 'SAPLSD41' '2200'.
perform bdc_field using 'BDC_CURSOR'
'DD02D-DDTEXT'.
perform bdc_field using 'BDC_OKCODE'
'=WB_BACK'.
perform bdc_field using 'DD02D-DDTEXT'
'educational data'.
perform bdc_dynpro using 'SAPMSRD0' '0102'.
perform bdc_field using 'BDC_CURSOR'
'RSRD1-TBMA_VAL'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_field using 'RSRD1-TBMA'
'X'.
perform bdc_field using 'RSRD1-TBMA_VAL'
'ZEDUDATA'.
perform bdc_transaction using 'SE11'.
perform close_group.
endform.
Similar Messages
-
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 -
Hi all,
1) i got a problem in BDC i.e suppose i have a flat file that is having 10 records
but my problem is i want to update first 8 records only using Call transaction
so where will do this and what is the logic for this . for both cases i.e Call transaction & session methods?
good rewards for replay,
regards,
sudharsanOnce you upload the file into an internl table,
delete the last two rows from the internal table.
call function GUI_UPLOAD
describe table itab lines v_lines.
delete table itab index v_lines.
v_lines = v_lines - 1.
delete table itab index v_lines.
then do your call transaction or BDC session method.
Regards,
Ravi -
hello expert,
I had a problem on BDC . it is that after recording , I want to upload my pc file to the server ,then change the material description . (I record TRX MM02).
after I upload the local file to the server , when I execute the BDC session , it poped up a window shows 'select at least one view',
I just wandered how to skip this popup window , I just only want to see the view of BASIC DATA1 .
Kind Regards
NickHi,
You need to do the recording again. It seems you recording file is not complete.
While recording perform the steps for update in the way you want you system
do to it for you.
Also check whether you are calling MM02 or MM01 while calling the BDC.
Regards,
Prakash Pandey -
Hi All,
I am facing a problem with bdc on va02. After hitting enter on the first screen it pops an info message "consider subsequent douments". It doesn't get recorded in recorded. Hence I am not able to run the transaction with no screen mode. Please help me to suppress the info message
NavinHi Navin,
These kind of messages and pop ups are precisely the reason why use of BDC for updating transactions is NOT advisable.
If you were to bypass such messages, you would have to put a check to see why the message appears (in this case probably because the sales document flow for the sales order in table VBFA has some documents) and then write a logic to either handle the message or not.
Instead i would recommend you use the BAPI functions provided by SAP to change the sales order.
Have a look the BAPI for sales order change attached to the business object BUS2012. For this goto transaction SWO1 and enter the BUS2012 business object. Then goto methods and look for the "change" method. Double click on the method and look at the BAPI used to implement the method. Go ahead and use this method in your program as against a BDC.
I am sure it will be a much better option.
Otherwise if you still want to proceed with a BDC, please debug at the point where the message/pop up appears to ascertain reason for the same and then incorporate the same check in your program to handle the pop up.
Regards,
Aditya -
Hi
I am facing a problem in BDC ,call trasaction, for FB01
While the recording is done, the confi has BSEG-DMBTR field (Local Currecny)
and now its not there is the screen.
If i run my BDC is foreground, it says Field does not exist as sucess message and then i press enter and it let me post the record.
But in Background, its not letting me post the document.
wether its because , in background if any screen elements is message , being a succes message, it doesnot post ?
please helpHi Munish singh,
Actually this error because of currency field.
1) declare the character variable equal to the dmbtr field output length. ex: data: v_dmbtr type c length 18.
2) before passing to the screen field.
3) move itab-dmbtr to v_dmbtr.
condence v_dmbtr.
4) And pass this v_dmbtr to the screen field ....
then your issue positively will resolved.
Dont forgot to Reward me points .....
All the very best....
Regards,
Sreenivasa sarma K. -
Dear All,
Iam facing the problem in BDC Program..the code is..
LOOP AT IT_RECORD.
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR' 'RF05A-NEWKO'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-vramt. "'100000'.
perform bdc_field using 'RF05A-NEWBS' it_record-pkey. "'50'.
perform bdc_field using 'RF05A-NEWKO' it_Record-vrac. "'24450024'.
perform bdc_field using 'DKACB-FMORE' 'X'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_CURSOR' 'COBL-GSBER'.
perform bdc_field using 'BDC_OKCODE' '=ENTE'.
perform bdc_field using 'COBL-GSBER' it_record-gsber. "'KABA' .
COUNT = COUNT + 1.
WRITE:/ COUNT.
IF COUNT = 4.
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-GSBER'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-VRAMT. "'50000'.
perform bdc_field using 'BSEG-MWSKZ' '**'.
perform bdc_field using 'BSEG-GSBER' IT_RECORD-GSBER ."'kaba'.
perform bdc_field using 'BSEG-ZFBDT' '03.12.2007'.
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-WRBTR'.
perform bdc_field using 'BDC_OKCODE'
'=BS'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-VRAMT. "'50,000.00'.
perform bdc_field using 'BSEG-MWSKZ'
perform bdc_field using 'BSEG-BUPLA' '1800'.
perform bdc_field using 'BSEG-GSBER' IT_RECORD-GSBER."'KABA'.
perform bdc_field using 'BSEG-ZFBDT' '03.12.2007'.
perform bdc_dynpro using 'SAPMF05A' '0700'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWBS'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A'.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
here iam using 4 line item(in text file) ..if count = 4 its not going to next screen, its repeating..its not simulating and posting the doc..
pls guide me friends.hi i send the code here, if u can understand clear it..
report ZBDC_FI_MVF_02 no standard page heading line-size 255.
DATA : BEGIN OF IT_RECORDS OCCURS 0,
BLDAT LIKE BKPF-BLDAT,
BLART LIKE BKPF-BLART,
BUKRS LIKE BKPF-BUKRS,
BUDAT LIKE BKPF-BUDAT,
MONAT LIKE BKPF-MONAT,
WAERS LIKE BKPF-WAERS,
NEWBS LIKE RF05A-NEWBS,
NEWKO LIKE RF05A-NEWKO,
END OF IT_RECORDS.
DATA : BEGIN OF IT_RECORD OCCURS 0,
VRAMT(15), " LIKE BSEG-WRBTR,
PKEY LIKE RF05A-NEWBS,
VrAC(10), " LIKE RF05A-NEWKO,
GSBER LIKE COBL-GSBER,
END OF IT_RECORD.
DATA : BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
DATE1 LIKE SY-DATUM,
DATE2 LIKE SY-DATUM,
LOOP(3).
DATA : COUNT(3).
start-of-selection.
PERFORM GET_DATA1.
PERFORM GET_DATA2.
PERFORM PROCESS_DATA.
FORM PROCESS_DATA.
perform bdc_dynpro using 'SAPMF05A' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWKO'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
date1 = it_RecordS-bldat.
CONCATENATE DATE16(2) DATE14(2) DATE1+0(4) INTO DATE1.
perform bdc_field using 'BKPF-BLDAT' DATE1. "'03.12.2007'.
perform bdc_field using 'BKPF-BLART' IT_RECORDS-BLART. "'SA'.
perform bdc_field using 'BKPF-BUKRS' IT_RECORDS-BUKRS. "'1800'.
date2 = it_RecordS-bUdat.
CONCATENATE DATE26(2) DATE24(2) DATE2+0(4) INTO DATE2.
perform bdc_field using 'BKPF-BUDAT' DATE2. "'03.12.2007'.
perform bdc_field using 'BKPF-MONAT' IT_RECORDS-MONAT. "'9'.
perform bdc_field using 'BKPF-WAERS' IT_RECORDS-WAERS. "'INR'.
perform bdc_field using 'FS006-DOCID' '*'.
perform bdc_field using 'RF05A-NEWBS' IT_RECORDS-NEWBS. "'40'.
perform bdc_field using 'RF05A-NEWKO' IT_RECORDS-NEWKO. "'24450024'.
*perform bdc_field using 'RF05A-NEWBS' IT_RECORDS-PKEY. "'50'.
*perform bdc_field using 'RF05A-NEWKO' IT_RECORDS-VENAC. "'24450024'.
*perform bdc_field using 'DKACB-FMORE' 'X'.
COUNT = '0'.
LOOP AT IT_RECORD.
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR' 'RF05A-NEWKO'.
perform bdc_field using 'BDC_OKCODE' '/00'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-vramt. "'100000'.
perform bdc_field using 'RF05A-NEWBS' it_record-pkey. "'50'.
perform bdc_field using 'RF05A-NEWKO' it_Record-vrac. "'24450024'.
perform bdc_field using 'DKACB-FMORE' 'X'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_CURSOR' 'COBL-GSBER'.
perform bdc_field using 'BDC_OKCODE' '=ENTE'.
perform bdc_field using 'COBL-GSBER' it_record-gsber. "'KABA' .
COUNT = COUNT + 1.
IF COUNT = 4.
clear count.
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-GSBER'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-VRAMT. "'50000'.
perform bdc_field using 'BSEG-MWSKZ' '**'.
perform bdc_field using 'BSEG-GSBER' IT_RECORD-GSBER ."'kaba'.
perform bdc_field using 'BSEG-ZFBDT' '03.12.2007'.
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-WRBTR'.
perform bdc_field using 'BDC_OKCODE'
'=BS'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-VRAMT. "'50,000.00'.
perform bdc_field using 'BSEG-MWSKZ'
perform bdc_field using 'BSEG-BUPLA' '1800'.
perform bdc_field using 'BSEG-GSBER' IT_RECORD-GSBER."'KABA'.
perform bdc_field using 'BSEG-ZFBDT' '03.12.2007'.
perform bdc_dynpro using 'SAPMF05A' '0700'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWBS'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A'.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-GSBER'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BSEG-WRBTR' '50000'.
perform bdc_field using 'BSEG-MWSKZ' '**'.
perform bdc_field using 'BSEG-GSBER' 'kaba'.
perform bdc_field using 'BSEG-ZFBDT' '03.12.2007'.
perform bdc_dynpro using 'SAPMF05A' '0302'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-WRBTR'.
perform bdc_field using 'BDC_OKCODE'
'=BS'.
perform bdc_field using 'BSEG-WRBTR' IT_RECORD-VRAMT. "'50,000.00'.
perform bdc_field using 'BSEG-MWSKZ' '**'.
perform bdc_field using 'BSEG-BUPLA' '1800'.
perform bdc_field using 'BSEG-GSBER' IT_RECORD-GSBER. "'KABA'.
perform bdc_field using 'BSEG-ZFBDT' '03.12.2007'.
perform bdc_dynpro using 'SAPMF05A' '0700'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWBS'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_transaction using 'F-02'.
*CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A'.
ENDFORM.
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 <> ' '.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
*& Form GET_DATA
form GET_DATA1 .
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'C:\MVF-02_1.txt'
FILETYPE = 'DAT'
TABLES
data_tab = IT_RECORDS
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. " GET_DATA
*& Form GET_DATA2
form GET_DATA2 .
CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'C:\MVF-02_2.TXT'
FILETYPE = 'DAT'
TABLES
data_tab = IT_RECORD
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. " GET_DATA2 -
Hi I am having a problem in BDC Recording. My requirement is that when I input data in transaction fb02 to block the invoices, It shows a list of invoices. Now i need to double click that item(line) in which PK = 06 at runtime during bdc recording. During BDC recording it takes the line number on which we have clicked which is constant but i want it dynamic that if item 1 is having PK=6, that line should be double clicked and if item 3 is having PK=6, the third item should be double clicked to open another screen. Kindly help me... Thanks in advance.
Hi Ravi,
While writing your code that is in your code you know which line number is having the PK = 06, then you can use the same line number and add the code for double click after that.
Regards,
Atish -
Syntax problem with BDC perform
Dear Friends,
small problem in BDC Perform syntax but I am not getting how to do this..
I have writen the code like this in my BDC byt its throughing the error...Here I want to do the validation on each and every field. I mean If that field values are empty i don't want to change the SAP field value.
my code is like this.
PERFORM dynpro USING:
'X' 'SAPLMGMM' '0080'.
IF NOT p_int_matl-werks IS INITIAL.
' ' 'RMMG1-WERKS' p_int_matl-werks.
ENDIF.
IF NOT p_int_matl-werks IS INITIAL.
' ' 'RMMG1-LGORT' p_int_matl-lgort.
ENDIF.
' ' 'BDC_OKCODE' '/00'.
pls give me exact code how to do this...
Thanks
SridharHi sridher,
1. this kind of syntax ie. IF will give error.
2. If ur requirement is : blank value should not be put in bdc,
3. then one way is to change / write the logic
inside the form itself.
4. ie. inside the routine/form DYNPRO.
5. So, it will be then general for all performs.
regards,
amit m. -
Java Session problem while sending mail(using javamail) using Pl/SQL
Hello ...
i am using Java stored procedure to send mail. but i'm getting java session problem. means only once i can execute that procedure
pls any help.props.put("smtp.gmail.com",host);I doubt javamail recognizes the 'smtp.gmail.com' property. I think it expects 'mail.host'. Of course since it cannot find a specified howt it assumes by default localhost
Please format your code when you post the next time, there is a nice 'code' button above the post area.
Mike -
Problem in BDC while going back to previous screen in FB60
Dear All,
I have a problem in BDC my BDc stops when it tries to go back to previous screen then manually i have to click on the back button then it gets posted. the previous screen recording for FB60 is
SAPMSSY0 0120 X
BDC_CURSOR 16/32
BDC_OKCODE =&IC1
When we do back by clicking on the screen is not getting recorded. Kindly suggest a suitable Solution for the same.
ReagrdsFB60 is an EnjoySAP transaction and not well suited to batch input (look for notes). Better to use a BAPI or batch input on FB01.
Rob -
Hi Experts,
I m facing a problem while doing the BDC for F-32, i want to make Normal OI check field as Uncheck through BDC , while recording i have uncheck the check box and the field value appears to be ' ' in the recording , but when i process the BDC the field remains CHECKED by Default.
pls help how can i unchecked the field.
I have tried it by puting the value of the field 'X' also but still it remains checked .
pls help me how can i UNCHECKED the Normal OI screen field .Hi
The output format of an amonut is managed by the currency, you shouldn't have any particular problem,
In BDC program the field to be used to transfer the amount has to be char, so probably the easier solution is to write it into the bdc field in according to the currency:
WRITE <AMOUNT> CURRENCY <CUURENCY> TO <BDC FIELD>.
Max -
Problem in BDC for F-02 -- Currency Problem
Dear Experts,
I have written a BDC for F-02 to upload the opening balances of vendors.
Problem is , this BDC is for Libya country, where decimal places is 3.
Now when i run my BDC, if the amount is 22.54, it will upload it as 22.540, which is ok, but if the amount is 22.543, it upload it as 22.540 instead of 22.543.
can one provide some guidance in this....
Regards,
MaverickHi
The output format of an amonut is managed by the currency, you shouldn't have any particular problem,
In BDC program the field to be used to transfer the amount has to be char, so probably the easier solution is to write it into the bdc field in according to the currency:
WRITE <AMOUNT> CURRENCY <CUURENCY> TO <BDC FIELD>.
Max -
Session problem in jsp application
I face a session problem. I setting everything in a session and when pass back to a main page, the value is not display in the screen. But after refresh the value will display in the screen and this kind of problem only come out very few time and i dun knw how to solve this...
Anyone here can give me some idea and suggestion or the way to solve this kind of problem!!!define "2 different clients"
1) You have 2 different PCs and it's using the same session ID for both? I doubt this. I think the server is advanced enough not to use give a session ID that's already been created.
2) You have 1 PC and are using IE or Netscape and using File > New Window to open a new window and connect again. This you can't fix without using only URL rewriting to manage session, because the different windows will share the same session cookies. -
How to call session directly in bdc without using SM35
how to call session directly in bdc without using SM35
HI
good
you r using the sm35 to see the session for calling teh session in your report
ATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE ,
c_session LIKE apqi-groupid VALUE 'Z3PL_CUST' ,
c_job LIKE tbtcjob-jobname VALUE 'Z3PL_JOB_CUST' ,
c_flag TYPE c VALUE 'X' ,
g_qid TYPE apqi-qid .
thanks
mrutyun
Maybe you are looking for
-
Filling in the blanks on a downloaded .pdf file using Acrobat Pro 5.1
I've downloaded a form and need to fill it out and submit it online. I have Adobe Acrobat Professional 5.1. For the life of me, I can't figure out how to do it. The document has no security settings. Can someone please help? I'd sure appreciate it.
-
I would like to ask, how it is possible to get all accessible camera resolutions in Windows Phone 8.1 app (for both silverlight and WinRT). I wanted to use: Windows.Phone.Media.Capture.PhotoCaptureDevice.GetAvailableCaptureResolutions( Windows.Phone.
-
How to enable ping to VIP on ACE
I want to be able to ping the VIP address on our ACE. How can i accomplish that ? Is it by adding an ICMP match to the VIP class-map ? I have globally enabled ICMP for management purposes.
-
Total value for PO not displayed
Hi, While creating a SSP PO, the total value is not displayed. Please suggest. Regards, Anand.
-
Printing regular documents?
having difficulty printing regular documents. asking for document file name