In bdc
hi gurus in bdc there r 100 records , while processingit , if system crashes after 15th record .
tell me what happend , how many records r uploaded , how we start the remaining
explain me in boath calltrandaction & session method.
In the Call transaction Method,
It will process all the records if the Update Mode is 'N', it will store all the error messages in BDCMSGCOLL structure. The errored records would be stored in that structure.
In Session Method,
It stops in the 15th error record, it wont move further.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/fa/09715a543b11d1898e0000e8322d00/frameset.htm
Re: BDC Errors
Similar Messages
-
Error while running a BDC for the Transaction F-02
Hi,
I'm getting an error <b><i>"Parking not possible during Batch Input"</i></b> while running a BDC for the transaction F-02.
When i click on the error message it displays the message [b<i>]"In Customizing, you can control whether an error message is issued."</b></i>
How to solve this issue?.
Waiting for ur replies.........
Regards
N.SenthilHi,
When you are doing the recording in SHDB, and in the same screen where the TCODE to be recorded is given, there are options that you can choose called "Recording Parameters"...Select the checkbox which says "Not a Batch Input Session", this will set the sy-binpt variable to " "(in a recording by default it is "X")...and you will not get this error...
Also make sure while writing the BDC program to make use of the "bdc options" parameter which has this property to switch of sy-binpt...
Refer below theard for sample bdc code for f-02.
https://forums.sdn.sap.com/click.jspa?searchID=5126766&messageID=1538409
Regards -
Unable to update the serial number through bdc in Sales Order
Hi experts,
I written the inboud FM for to update the 3rd party items serial number to the sales orders through BDC Call transaction Method.
Here i am facing a problem when i have the 19 item Quan ,it is updating correct through idoc , when ever there is moe than 19 and at that if any serial number repeated for that if i am changing at that time it is loosing the control of the BDC and giving the control to the salesorder screen.
how can i handle that control again has to come to BDC prgrm......
Thnks,
Regards,
BharaniHi,
Can you please let me know the segment in ORDERS05 Idoc to process the Payment card information and if the standard Function Module can handle the creation of a Sales Order with data for Payment Card.
We have a requirement to map the Tokenized Number of the Credit Card send from a store front end to ECC mapping via SAP-PI.
Thanks in Advance, -
MULTIPLE ITEM PROBLEM IN VL31N BDC
hI FRIENDS ,
I AM POSTING A BDC OF TRANSACTION VL31N ,ie FOR SCHEDULE AGREEMENT INBOUND DELIVERY.I CREATE A FUNCTIONAL MODULE OF THE SAME AND CALL IT FROM AN ASP PAGE,IN THAT THERE IS PO NUMBER 5500000986 WHICH HAS TWO ITEMES 62 AND 95 RESPECTIVLY OF SAME MATARIAL NUMBER R010230123041002 AND DIE NUMBER 2304P,NOW THE PROBLEM IS THIS BDC IS WORKING WHEN THERE IS ONLY ONE ITEM BUT GIVES AN ERROR "CANT CREAT INBOUND DELIVERY FOR PO NO ...' WNEN IT HAS MULTIPLE ITEM.WHAT SHOULD I DO ? I ALSO USED LOOP BUT IT ALSO DOSENT WORK AS IT WILL ADD ALL OPEN QTY OF PO 986 AND UPDATE AGAINST ITEM NO 95.
CODE IS AS FOLLOWS:.........
FUNCTION y_synie_bdcinbdly.
""Local interface:
*" IMPORTING
*" VALUE(CTU) LIKE APQI-PUTACTIVE DEFAULT 'X'
*" VALUE(MODE) LIKE APQI-PUTACTIVE DEFAULT 'N'
*" VALUE(UPDATE) LIKE APQI-PUTACTIVE DEFAULT 'L'
*" VALUE(GROUP) LIKE APQI-GROUPID OPTIONAL
*" VALUE(USER) LIKE APQI-USERID OPTIONAL
*" VALUE(KEEP) LIKE APQI-QERASE OPTIONAL
*" VALUE(HOLDDATE) LIKE APQI-STARTDATE OPTIONAL
*" VALUE(NODATA) LIKE APQI-PUTACTIVE DEFAULT '/'
*" VALUE(EXTNID) LIKE MAKT-MAKTG
*" VALUE(VENDORNO) LIKE LFA1-LIFNR
*" VALUE(PONUMBER) LIKE EKKO-EBELN
*" VALUE(ITEMNUMBER) LIKE LIPS-VGPOS
*" VALUE(MATERIAL) LIKE MAKT-MAKTG
*" VALUE(DLYQTY) LIKE LIPS-LFIMG
*" VALUE(BTCHNO) LIKE LIPS-CHARG
*" VALUE(POSLR) LIKE EKES-EBELP OPTIONAL
*" EXPORTING
*" VALUE(SUBRC) LIKE SYST-SUBRC
*" VALUE(INDELYNO) LIKE SY-MSGV2
*" VALUE(MSG1) LIKE SY-MSGV1
*" VALUE(MSG2) LIKE SY-MSGV2
*" VALUE(MSG3) LIKE SY-MSGV3
*" VALUE(MSG4) LIKE SY-MSGV4
*" TABLES
*" MESSTAB STRUCTURE BDCMSGCOLL
*" ERRTAB STRUCTURE YSYNERRMSGS
*" INDLYTAB STRUCTURE YSYN_QTYTAB
Updated by ANAND SYNISE 19.1.2007
DATA: BEGIN OF bdctab OCCURS 0.
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdctab.
DATA: datenow(10) TYPE c,
fldvar(30) TYPE c,
fldno TYPE i,
flditoc(6) TYPE c,
qty(13) TYPE c.
DATA maxposnr LIKE lips-posnr.
DATA testposnr TYPE posnr.
DATA itemnoint TYPE i.
CONCATENATE sy-datum6(2) '.' sy-datum4(2) '.' sy-datum+0(4) INTO datenow.
CLEAR bdctab.
REFRESH bdctab.
PERFORM open_group USING group user keep holddate ctu.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '4007'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'RV50A-VERUR_LA'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '/00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-LIFNR'.
bdctab-fval = vendorno.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LV50C-BSTNR'.
bdctab-fval = ponumber.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-VERUR_LA'.
bdctab-fval = extnid.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=MKAL_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIKP-BLDAT'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=POPO_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-POSNR(01)'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '0111'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'RV50A-PO_MATNR'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = 'WEIT'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-PO_MATNR'.
bdctab-fval = material.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=POLO_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-POSNR(01)'.
APPEND bdctab.
*ADDED BY ANAND ON 22-01-2007
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = ITEMNUMBER . "ITEMNUMBER = LIPS-VGPOS
APPEND bdctab.
************ENDED***********************
ADDED BY MILIND 19.01.2007
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = poslr .
APPEND bdctab.
* ENDED * *
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LIPS_SELKZ(01)'.
bdctab-fval = ''.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '/00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-CHARG(01)'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
QTY = INDLYTAB-DLYQTY.
qty = dlyqty.
bdctab-fnam = 'LIPSD-G_LFIMG(01)'.
bdctab-fval = QTY.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIPS-CHARG(01)'.
* BDCTAB-FVAL = INDLYTAB-BTCHNO.
bdctab-fval = btchno.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-program = 'SAPMV50A'.
bdctab-dynpro = '1000'.
bdctab-dynbegin = 'X'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_OKCODE'.
bdctab-fval = '=SICH_T'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'LIKP-BLDAT'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_CURSOR'.
bdctab-fval = 'LIPS-MATNR(02)'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFDAT_LA'.
bdctab-fval = datenow.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'RV50A-LFUHR_LA'.
bdctab-fval = '00:00'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CLEAR bdctab.
bdctab-fnam = 'BDC_SUBSCR'.
bdctab-fval = 'SAPMV50A'.
APPEND bdctab.
CALL TRANSACTION 'VL31N' USING bdctab MODE 'N' MESSAGES INTO messtab.
subrc = sy-subrc.
PERFORM close_group USING ctu.
CLEAR bdctab.
REFRESH bdctab.
IF sy-subrc EQ 0.
indelyno = sy-msgv2.
ENDIF.
LOOP AT messtab.
MOVE: messtab-msgid TO errtab-msgid,
messtab-msgnr TO errtab-msgnr,
messtab-msgv1 TO errtab-msg1,
messtab-msgv2 TO errtab-msg2,
messtab-msgv3 TO errtab-msg3,
messtab-msgv4 TO errtab-msg4.
APPEND ERRtab.
ENDLOOP.
LOOP AT errtab.
SELECT SINGLE text FROM t100
INTO errtab-errmsg
WHERE msgnr EQ errtab-msgnr AND arbgb EQ errtab-msgid
AND sprsl EQ sy-langu.
MODIFY errtab.
ENDLOOP.
ENDFUNCTION.Hi,
Check this code:
REPORT Z_CUSTOMER_UPLOAD .
D A T A D E C L A R A T I O N S *
DATA:BEGIN OF IT_CUSTOMER OCCURS 0,
KUNNR LIKE MV10A-KUNNR,
VKORG LIKE MV10A-VKORG,
VTWEG LIKE MV10A-VTWEG,
MATNR LIKE MV10A-MATNR,
KDMAT LIKE MV10A-KDMAT,
MEGRU LIKE MV10A-MEGRU,
SELKZ TYPE C value 'X',
LPRIO LIKE MV10A-LPRIO,
ANTLF LIKE MV10A-ANTLF,
END OF IT_CUSTOMER.
DATA:BEGIN OF IT_success OCCURS 0,
KUNNR LIKE MV10A-KUNNR,
VKORG LIKE MV10A-VKORG,
VTWEG LIKE MV10A-VTWEG,
MATNR LIKE MV10A-MATNR,
KDMAT LIKE MV10A-KDMAT,
MEGRU LIKE MV10A-MEGRU,
SELKZ TYPE C value 'X',
LPRIO LIKE MV10A-LPRIO,
ANTLF LIKE MV10A-ANTLF,
END OF IT_success.
DATA:BEGIN OF IT_error OCCURS 0,
KUNNR LIKE MV10A-KUNNR,
VKORG LIKE MV10A-VKORG,
VTWEG LIKE MV10A-VTWEG,
MATNR LIKE MV10A-MATNR,
KDMAT LIKE MV10A-KDMAT,
MEGRU LIKE MV10A-MEGRU,
SELKZ TYPE C value 'X',
LPRIO LIKE MV10A-LPRIO,
ANTLF LIKE MV10A-ANTLF,
END OF IT_error.
DATA: L_INDEX TYPE SY-TABIX.
DATA:IT_BDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
IT_DATA TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
ERROR MESSAGE TABLE
DATA:IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : C_S TYPE C VALUE 'S',
C_E TYPE C VALUE 'E'.
*DATA: IT_SUCCESS LIKE IT_CUSTOMER OCCURS 0,
IT_ERROR LIKE IT_CUSTOMER OCCURS 0.
DATA : V_RECTOT TYPE I,
V_RECERR TYPE I,
V_RECSUC TYPE I.
S E L E C T I O N - S C R E E N *
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_FILE LIKE RLGRAP-FILENAME .
SELECTION-SCREEN : END OF BLOCK B1.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
to get F4 help for p_file
PERFORM F4_FILENAME USING P_FILE.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
Uploading data from flat file into it_tab
PERFORM BDC_UPLOAD USING P_FILE.
PERFORM PROCESS_DATA.
PERFORM POPULATE_BDC.
E N D O F S E L E C T I O N *
*END-OF-SELECTION.
PERFORM DISPLAY_REPORT.
*& Form F4_FILENAME
text
-->P_P_FILE text
FORM F4_FILENAME USING P_P_FILE.
DATA:L_FILE TYPE IBIPPARMS-PATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = L_FILE .
P_P_FILE = L_FILE.
ENDFORM. " F4_FILENAME
*& Form BDC_UPLOAD
text
-->P_P_FILE text
FORM BDC_UPLOAD USING P_P_FILE.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_P_FILE
I_BEGIN_COL = 1
I_BEGIN_ROW = 1
I_END_COL = 8
I_END_ROW = 1000
TABLES
INTERN = IT_DATA
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " BDC_UPLOAD
*& Form PROCESS_DATA
text
--> p1 text
<-- p2 text
FORM PROCESS_DATA.
SORT IT_DATA BY ROW COL.
LOOP AT IT_DATA.
CASE IT_DATA-COL.
WHEN 1.
IT_CUSTOMER-KUNNR = IT_DATA-VALUE.
WHEN 2.
IT_CUSTOMER-VKORG = IT_DATA-VALUE.
WHEN 3.
IT_CUSTOMER-VTWEG = IT_DATA-VALUE.
WHEN 4.
IT_CUSTOMER-MATNR = IT_DATA-VALUE.
WHEN 5.
IT_CUSTOMER-KDMAT = IT_DATA-VALUE.
WHEN 6.
IT_CUSTOMER-MEGRU = IT_DATA-VALUE.
WHEN 7.
IT_CUSTOMER-LPRIO = IT_DATA-VALUE.
WHEN 8.
IT_CUSTOMER-ANTLF = IT_DATA-VALUE.
APPEND IT_CUSTOMER.
ENDCASE.
ENDLOOP.
ENDFORM. " PROCESS_DATA
*& Form POPULATE_BDC
text
--> p1 text
<-- p2 text
FORM POPULATE_BDC.
DATA:L_COUNTER TYPE N,
L_STRING TYPE STRING.
LOOP AT IT_CUSTOMER.
AT NEW KUNNR.
CLEAR L_COUNTER.
L_INDEX = SY-TABIX.
READ TABLE IT_CUSTOMER INDEX L_INDEX.
perform bdc_dynpro using 'SAPMV10A' '0100'.
perform bdc_field using 'MV10A-KUNNR'
IT_CUSTOMER-KUNNR.
perform bdc_field using 'MV10A-VKORG'
IT_CUSTOMER-VKORG.
perform bdc_field using 'MV10A-VTWEG'
IT_CUSTOMER-VTWEG.
perform bdc_field using 'BDC_OKCODE'
'/00'.
ENDAT.
L_COUNTER = L_COUNTER + 1.
CLEAR L_STRING.
perform bdc_dynpro using 'SAPMV10A' '0200'.
CONCATENATE 'MV10A-MATNR(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-MATNR.
CONCATENATE 'MV10A-KDMAT(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-KDMAT.
CONCATENATE 'MV10A-MEGRU(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-MEGRU.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*-- For Page down in Call Transaction Mode
IF L_COUNTER = 14.
CLEAR L_COUNTER.
PERFORM BDC_DYNPRO USING 'SAPMV45A' '4001'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=P+'.
ENDIF.
perform bdc_dynpro using 'SAPMV10A' '0200'.
CONCATENATE 'MV10A-SELKZ(' L_COUNTER ')' INTO L_STRING.
perform bdc_field using L_STRING
IT_CUSTOMER-SELKZ.
perform bdc_field using 'BDC_OKCODE'
'=SELE'.
perform bdc_dynpro using 'SAPMV10A' '0300'.
perform bdc_field using 'MV10A-KDMAT'
IT_CUSTOMER-KDMAT.
perform bdc_field using 'MV10A-LPRIO'
IT_CUSTOMER-LPRIO.
perform bdc_field using 'MV10A-ANTLF'
IT_CUSTOMER-ANTLF.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/EBACK'.
at end of kunnr.
READ TABLE IT_CUSTOMER INDEX L_INDEX.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
CALL TRANSACTION 'VD51' USING IT_BDC MODE 'A' UPDATE 'S'
MESSAGES INTO IT_MESSAGES.
CLEAR IT_BDC.
REFRESH IT_BDC.
ENDAT.
IF NOT IT_MESSAGES[] IS INITIAL.
PERFORM FORMAT_MESSAGE.
ENDIF.
ENDLOOP.
ENDFORM. " POPULATE_BDC
*& Form bdc_dynpro
text
-->P_0273 text
-->P_0274 text
FORM bdc_dynpro USING VALUE(P_0273)
VALUE(P_0274).
IT_BDC-PROGRAM = P_0273.
IT_BDC-DYNPRO = P_0274.
IT_BDC-DYNBEGIN = 'X'.
APPEND IT_BDC.
CLEAR IT_BDC.
ENDFORM. " bdc_dynpro
*& Form bdc_field
text
-->P_0278 text
-->P_RECORD_KUNNR_001 text
FORM bdc_field USING VALUE(P_0278)
VALUE(P_0279).
IT_BDC-FNAM = P_0278.
IT_BDC-FVAL = P_0279.
APPEND IT_BDC.
CLEAR IT_BDC.
ENDFORM. " bdc_field
*& Form FORMAT_MESSAGE
text
--> p1 text
<-- p2 text
FORM FORMAT_MESSAGE.
DATA: L_MSG(100).
LOOP AT IT_MESSAGES.
READ TABLE IT_CUSTOMER INDEX L_INDEX.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MESSAGES-MSGID
LANG = SY-LANGU
NO = IT_MESSAGES-MSGNR
V1 = IT_MESSAGES-MSGV1
V2 = IT_MESSAGES-MSGV2
V3 = IT_MESSAGES-MSGV3
V4 = IT_MESSAGES-MSGV4
IMPORTING
MSG = L_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ l_msg.
ENDLOOP.
ENDFORM. " FORMAT_MESSAGE
reward if helpful,
keerthi -
Creation of PGI using BDC for tc VL02N is not happening..
Hi All,
i need to do Post Goods Issue (PGI) thro' BDC and after that i need to update the flag in Ztable.
its giving Success message and updating the database also.
but its not issuing the PGI.and further i want to create billing doc.So its compulsory to me to post PGI.
if i look into the BDCMSGCOLL structure its giving "NO BATCH INPUT DATA FOR SCREEN"? why this is happening?
please let me know immediately....
REFRESH: tt_bdcmsgcoll .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = wa_created-document_numb
IMPORTING
output = wa_created-document_numb.
REFRESH tt_bdcdata.
PERFORM bdc_dynpro USING text-001 text-002.
PERFORM bdc_field USING text-008
text-014.
PERFORM bdc_field USING text-009
text-011.
PERFORM bdc_field USING text-014
wa_created-document_numb.
PERFORM bdc_dynpro USING text-001 text-003.
PERFORM bdc_field USING text-009
text-036.
PERFORM bdc_field USING text-025
sy-datum.
PERFORM bdc_field USING text-008
text-035.
PERFORM bdc_field USING text-037
sy-datum.
PERFORM bdc_field USING text-038
text-029.
PERFORM bdc_field USING text-016
c_x.
CALL TRANSACTION c_t_del USING tt_bdcdata
MODE c_m
UPDATE c_u
MESSAGES INTO tt_bdcmsgcoll .
SORT tt_bdcmsgcoll BY msgtyp.
READ TABLE tt_bdcmsgcoll INTO wa_bdcmsgcoll WITH KEY msgtyp = c_e.
IF sy-subrc EQ 0.
LOOP AT tt_bdcmsgcoll INTO wa_bdcmsgcoll WHERE msgtyp = c_e.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = wa_bdcmsgcoll-msgid
lang = text-010
no = wa_bdcmsgcoll-msgnr
v1 = wa_bdcmsgcoll-msgv1
v2 = wa_bdcmsgcoll-msgv2
v3 = wa_bdcmsgcoll-msgv3
v4 = wa_bdcmsgcoll-msgv4
IMPORTING
msg = v_msg
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
WRITE :/ v_msg.
ENDLOOP.
ELSE.
MOVE : c_x TO wa_worklist-pgi_flag.
READ TABLE tt_epit INTO wa_epit WITH KEY epi_id = wa_worklist-epi_id epi_sr = wa_worklist-epi_sr.
IF sy-subrc EQ 0.
MODIFY tt_epit FROM wa_worklist TRANSPORTING pgi_flag WHERE epi_id = wa_worklist-epi_id AND epi_sr = wa_worklist-epi_sr.
ELSE.
APPEND wa_worklist TO tt_epit.
ENDIF.
wa_epit-pgi_flag = c_x.
MODIFY tt_epit FROM wa_epit TRANSPORTING pgi_flag WHERE epi_id = wa_worklist-epi_id AND del_no = wa_created-document_numb .
UPDATE zsd_dt_epit SET pgi_flag = 'X' WHERE epi_id = wa_worklist-epi_id AND del_no = wa_created-document_numb .
IF sy-subrc EQ 0.
ENDIF.
ENDIF.HI,
Please refer this
To perform Post goods issue
PERFORM OPEN_GROUP.
PERFORM BDC_DYNPRO USING 'SAPMV50A' '4004'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'LIKP-VBELN'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=WABU_T'.
PERFORM BDC_FIELD USING 'LIKP-VBELN' DELIVERY.
'84000064'.
PERFORM BDC_TRANSACTION USING 'VL02N'.
PERFORM CLOSE_GROUP.
CLEAR : DELIVERY,
T_BSITEM,
T_BSICTL.
ENDIF.
ENDFORM. " DELIVERY -
Problem in creation of BDC for transaction phap_create
Hello Friends,
I am trying to create BDC for PHAP_CREATE.
When you run a transaction a pop up window appears to select the template id.
And in BDC it is selected by cursor position. So once selected, the value of template id cannot be changed.
I want this as a parameter.So that each time I run a BDC I will be able to create different types of Appraisal documents i.e with different template ids.
How to go about it???
Regards,
BhushanHi,
For selecting the id, while doing recording,
record with
CTRL + F ( Where u can give ur id) and proceed further. -
Dear Experts,
I have a module pool program and transaction for shipping advice, where I have given a option that if user enters Sales Order in the selection screen and in the next screen it shows all the related infromation of that order and if needed user can edit few fields in this screen and can take print.
Now for the same report I dont want to show any screen to user after user enters the order and executes directly it should display the dialog box for 'Print' and 'Print Preview'.
I did BDC recording for the transaction of shipping adive report and with that code I have developed other program and if run this program in foreground (Mode "A")it will show all screens with that dialog screen for 'Print' also but if I run in background (Mode "B") it will not show any screen and it will print the document directly.
Now my requirement is I have to show only dialog screen for 'Print' & 'Print Preview'.
Please give me your valuable Ideas on how to achieve this...
Thanks in advance.
Best Regards
VenkatHello,
May be you are not using the full recording or might have some mistake(s) is going on in the completion of recording that is why it is creating problem. And also please check the call transaction code in the BDC program, whether you are performing the accurate t-code with that or not and also perform BDC functions also. If it is right than it would not might have any problem regarding the required output as you want.
Thanks & Regards,
Akg -
What is the Tcodes for Uploading of data using BDC & CATT
PP members:
I was going through the <b>cutover activities</b> , and what I understood is we transfer all the legacy system data into SAP before going live
The data upload follows certain steps (depends on the organizational design load strategies)
First we upload all the master data ( material master, BOM, W/C's & Routings)
Then the transaction data ( Ideally speaking, there should no open orders i.e. WIP as on the day of cutoff )
If the WIP (Work in Process) is unavoidable then the materials consumed shall be treated as <b>materials of the previous stage</b> and necessary adjustments shall be made after cutover day
At this point, I could not able to understand what does the author mean <b>materials of the previous stage</b>
Now comming to the uploading of data into SAP from legacy system, we use tools like LSMW, CATT & BDC
Is it a must to use <b>only LSMW tool</b> to upload master data or any other upload tools are fine
Lastly,. I am not sure about the Tcode of CATT & BDC
Summary of the questions:
1.What does the author mean <b>material of previous stage</b>, for WIP materials during cutover activities
2. Is it mandatory to use only LSMW tool for uploading for master data
3. What are the Tcodes for upload tools CATT & BDC ?
Thanks for your time
Suren RDear,
1.What does the author mean material of previous stage, for WIP materials during cutover activities - as i understood, what is the stage of material..like it must have gone through 2 work centers and other 2 is left. i.e. you need to create Production order with only 2 operation as other 2 is already over. - usually it is done in such a way that we will create Production order and confirm till 2 operations and WIp is calculated so thatb FI will tally the books in SAP and lagacy.
2. Is it mandatory to use only LSMW tool for uploading for master data - no you can use any tool as required and suits yr requirement
3. What are the Tcodes for upload tools CATT & BDC- BDC through a prog in SE38. CATT through - SCEM. -
Unable to capture sy-ucomm in BDC
Hello Everyone,
I have created a BDC for CG3Y everything is working fine after creating a log when sy-subrc eq 0. when user hits SAVE I have given a message stating 'LOG HAS BEEN GENERATED' but when the pop for overwrite appears and I hit NO, it should give a different message for that i am not able to capture SY-UCOMM.
please help.Actually the issue was just had to get the file(Error log) from Application Server to Presentation, Here is the code for it.
data: i_fl_openerror type boolean,
i_os_message(100) type C,
i_flg_continue type boolean.
CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'
EXPORTING
i_file_front_end = 'C:\ERROR_LOG.XLS'
i_file_appl = '/USR/SAP/TMP/FILE3.XLS'
* I_FILE_OVERWRITE = ESP1_FALSE
IMPORTING
E_FLG_OPEN_ERROR = i_fl_openerror
E_OS_MESSAGE = i_os_message
EXCEPTIONS
FE_FILE_OPEN_ERROR = 1
FE_FILE_EXISTS = 2
FE_FILE_WRITE_ERROR = 3
AP_NO_AUTHORITY = 4
AP_FILE_OPEN_ERROR = 5
AP_FILE_EMPTY = 6
OTHERS = 7
IF sy-subrc <> 0.
case sy-subrc.
when 2.
CALL FUNCTION 'C14A_POPUP_ASK_FILE_OVERWRITE'
IMPORTING
E_FLG_CONTINUE = i_flg_continue
if i_flg_continue eq true.
CALL FUNCTION 'C13Z_FILE_DOWNLOAD_ASCII'
EXPORTING
i_file_front_end = 'C:\ERROR_LOG.XLS'
i_file_appl = '/USR/SAP/TMP/FILE3.XLS'
I_FILE_OVERWRITE = ESP1_TRUE
IMPORTING
E_FLG_OPEN_ERROR = i_fl_openerror
E_OS_MESSAGE = i_os_message
EXCEPTIONS
FE_FILE_OPEN_ERROR = 1
FE_FILE_EXISTS = 2
FE_FILE_WRITE_ERROR = 3
AP_NO_AUTHORITY = 4
AP_FILE_OPEN_ERROR = 5
AP_FILE_EMPTY = 6
OTHERS = 7
IF sy-subrc <> 0.
write : / 'CANNOT DOWNLOAD' , '/USR/SAP/TMP/FILE3.XLS' .
else.
write : / 'LOG HAS BEEN GENERATED C:\ERROR_LOG.XLS'.
endif.
else.
write : / 'LOG NOT GENERATED'.
endif.
when others .
write : / 'CANNOT DOWNLOAD FILE1', '/USR/SAP/TMP/FILE3.XLS'.
endcase. -
Unable to run BDC due to start-of-selection
Hi Experts,
I am running BDC for ROH type.
The data is in the excel file so I am performing the below operation.
In the BDC recording before perform open group there is "START-OF-SELECTION" and I also have a START-OF-SELECTION for excel uploading now how wud both would go together..
My requirement is to select the file through F4 then choose BDC type session or call transaction
and upload the data
Since I have 2 start-of-selection nothing happens after F8.
Help is really appreciated and rewarded.
Selection-screen begin of block b1 with frame title text-001.
parameter: f_name type rlgrap-filename default 'D:\Cost_element_KS06.xls'.
parameter : p_begcol type i default 1 no-display,
p_begrow type i default 2 no-display,
p_endcol type i default 8 no-display,
p_endrow type i default 46 no-display.
selection-screen end of block b1.
at selection-screen on value-request for f_name.
perform f_get_file using f_name.
start-of-selection.
perform f_xls_itab using f_name changing it_excel.
perform f_move_data.
include bdcrecx1.
start-of-selection.
perform open_group.
loop at t_ks06 to wa.
" Here I have the BDC recording recorderd through SHDB for ROH
endloop.
perform close_group.
Ranjith N.Hi Avinash,
I have made the following modification but stil the same.
report ZNRD_BDC_UPD_COSTELEMENT
no standard page heading line-size 255.
* Declaring work area and internal tables
data : begin of t_ks06 occurs 0,
KOKRS type KOKRS, " Controlling area
KSTAR type KSTAR, " Cost element
DATAB type DATAB, " Valid from date
DATBI type DATBI, " Valid to date
KTEXT type KTEXT, " Name
LTEXT type LTEXT, " Description
KATYP type KATYP, " Cost element cat
KOSTL type KOSTL, " Cost center
end of t_ks06.
data : wa like line of t_ks06.
data : it_excel type alsmex_tabline occurs 0 with header line.
*data : flg_mv(1) type n value 0. " Flag to check data Moved.
selection-screen begin of block b1 with frame title text-001.
parameter: f_name type rlgrap-filename default 'C:\Documents and Settings\Administrator\Desktop\Project_data\Cost_element_KS06.xls'.
parameter : p_begcol type i default 1 no-display,
p_begrow type i default 2 no-display,
p_endcol type i default 8 no-display,
p_endrow type i default 46 no-display.
selection-screen end of block b1.
" Iam performing all subroutines under at selection-screen and under start-of-selection Iam calling the bdc
but still nothing happens. please help
at selection-screen on value-request for f_name.
perform f_get_file using f_name.
perform f_xls_itab using f_name changing it_excel.
perform f_move_data.
*perform f_display_data.
start-of-selection.
perform open_group.
loop at t_ks06 to wa.
perform bdc_dynpro using 'SAPLKMA4' '0200'.
perform bdc_field using 'BDC_CURSOR'
'CSKBZ-KOKRS'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'CSKBZ-KOKRS'
wa-KOKRS.
perform bdc_field using 'CSKBZ-KSTAR'
wa-KSTAR.
perform bdc_field using 'CSKBZ-DATAB_ANFO'
wa-DATAB.
perform bdc_field using 'CSKBZ-DATBI_ANFO'
wa-DATBI.
perform bdc_dynpro using 'SAPLKMA4' '0299'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'CSKBZ-EIGEN'.
perform bdc_field using 'CSKBZ-KTEXT'
wa-KTEXT.
perform bdc_field using 'CSKBZ-LTEXT'
wa-LTEXT.
perform bdc_field using 'CSKBZ-KATYP'
wa-KATYP.
perform bdc_dynpro using 'SAPLKMA4' '0299'.
perform bdc_field using 'BDC_OKCODE'
'=VKON'.
perform bdc_field using 'BDC_CURSOR'
'CSKBZ-KTEXT'.
perform bdc_field using 'CSKBZ-KTEXT'
wa-KTEXT.
perform bdc_field using 'CSKBZ-LTEXT'
wa-LTEXT.
perform bdc_field using 'CSKBZ-KATYP'
wa-KATYP.
perform bdc_dynpro using 'SAPLKMA4' '0299'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'CSKBZ-KOSTL'.
perform bdc_field using 'CSKBZ-KOSTL'
wa-KOSTL.
perform bdc_dynpro using 'SAPLKMA4' '0299'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BDC_CURSOR'
'CSKBZ-KOSTL'.
perform bdc_field using 'CSKBZ-KOSTL'
wa-KOSTL.
perform bdc_transaction using 'KA06'.
endloop.
perform close_group.
include bdcrecx1.
*& Form f_get_file
* text
* -->P_FILE_NAM text
form f_get_file using p_file_nam.
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
* FIELD_NAME = ' '
* STATIC = ' '
* MASK = ' '
changing
file_name = f_name
exceptions
mask_too_long = 1
others = 2.
endform. " f_get_file
*& Form f_xls_itab
* text
* -->P_FILE_NAM text
* <--P_IT_EXCEL text
form f_xls_itab using p_file_nam changing p_it_excel.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = f_name
i_begin_col = p_begcol
i_begin_row = p_begrow
i_end_col = p_endcol
i_end_row = p_endrow
tables
intern = it_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
endform. " f_xls_itab
*& Form f_move_data
* text
* --> p1 text
* <-- p2 text
form f_move_data.
data : lv_index type i.
field-symbols <fs>.
* Sorting the internal table
sort it_excel by row col.
clear it_excel.
loop at it_excel.
move it_excel-col to lv_index.
* Assigning each record to the internal table row.
assign component lv_index of structure wa to <fs>.
* Assigning the field value to a field symbol
move it_excel-value to <fs>.
at end of row.
append wa to t_ks06.
* flg_mv = 1.
clear wa.
endat.
endloop.
endform. " f_move_data
*& Form f_display_data
* text
* --> p1 text
* <-- p2 text
form f_display_data.
write:/1 sy-uline(140).
write:/1 sy-vline, 'Cont area', " Controlling area
16 sy-vline, 'Cost ele', " Cost element
31 sy-vline, 'Valid from', " Valid from date
46 sy-vline, 'Valid to ' , " Valid to date
61 sy-vline, 'Name', "Cost element cat
76 sy-vline, 'Description', " Cost center
101 sy-vline, 'Cost ele cat', " Cost element cat
126 sy-vline, 'Cost center', " Cost center
140 sy-vline.
write:/1 sy-uline(140).
skip 1.
clear wa.
loop at t_ks06 into wa.
write:/2 sy-uline(139).
write:/2 sy-vline, wa-KOKRS, " Controlling area
16 sy-vline, wa-KSTAR, " Cost element
31 sy-vline, wa-DATAB, " Valid from date
46 sy-vline, wa-DATBI, " Valid to date
61 sy-vline, wa-KTEXT, " Name
76 sy-vline, wa-LTEXT, " Description
101 sy-vline, wa-KATYP, " Cost element cat
120 sy-vline, wa-KOSTL, " Cost center
140 sy-vline.
endloop.
endform. " f_display_data
Regards,
Ranjith -
Unable to incorporate multiple data in BDC * URGENT*
Hi EveryOne .
See the code. This code can do BDC for a single value of store and bonus buy no., in transaction WPMA
The current requirement is for a given store all bonus buy values should get populated and then executed each time store wise.
Eg
Store bonus buy values
1001 1
1001 2
1001 4
1002 A
1002 L
1003 6
1003 7
1003 H.
See the code below, and tell me the necessary changes required!!
report zwpma1
no standard page heading line-size 255.
type-pools slis.
data: wt_fcat type slis_fieldcat_alv.
data: it_fcat type slis_t_fieldcat_alv.
data: cnt type sy-tabix.
*include bdcrecx1.
types: begin of ty_final,
store(10) type c,
docnum type docnum,
bbynr type bbynr,
end of ty_final.
types: begin of ty_final1,
store(10),
bbynr type bbynr,
end of ty_final1.
data: wa_bonusbuy type zbonusbuy,
it_bonusbuy type standard table of zbonusbuy with header line,
it_bonusbuy1 type standard table of ty_final1 with header line,
it_t001w type standard table of t001w with header line,
it_edidc type standard table of edidc with header line,
it_edid4 type standard table of edid4 with header line,
it_final type standard table of ty_final with header line,
*Work areas:
wa_edidc type edidc,
wa_edid4 type edid4,
wa_final type ty_final.
data : it_bdcmsgcoll like bdcmsgcoll occurs 0 with header line.
data: bdcdata like table of bdcdata with header line.
data: lv_mode(1) value 'N'.
data : mtext(100) type c,
mvar1 like balm-msgv1,
w_msg(200) type c.
data : l_startt type sy-uzeit, " Time before Recording
l_endt type sy-uzeit, " time after recording
l_cdate type sy-datum. " Current date
start-of-selection.
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
percentage = 100
text = 'Extracting Data....... '.
select werks from t001w into corresponding fields of table it_t001w.
delete adjacent duplicates from it_t001w comparing werks.
if not it_t001w[] is initial.
select store bbynr mmid from zbonusbuy into corresponding fields of table it_bonusbuy for all
entries in it_t001w where store = it_t001w-werks.
if sy-subrc = 0.
sort it_bonusbuy by store.
endif.
endif.
refresh it_t001w.
loop at it_bonusbuy.
move-corresponding it_bonusbuy to it_bonusbuy1.
append it_bonusbuy1.
clear: it_bonusbuy, it_bonusbuy1.
endloop.
l_cdate = sy-datum.
clear l_startt .
l_startt = sy-uzeit.
loop at it_bonusbuy.
*break retaildev.
*perform open_group.
perform bdc_dynpro using 'RWDPOSAN' '1000'.
perform bdc_field using 'BDC_CURSOR'
'SO_BBUY-LOW'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'PA_VKORG'
'HB00'.
perform bdc_field using 'PA_VTWEG'
'H2'.
perform bdc_field using 'SO_FISEL-LOW'
'1001'.
it_bonusbuy-store.
LOOP AT it_bonusbuy1 WHERE store = it_bonusbuy-store.
if sy-subrc = 0.
perform bdc_field using 'PA_BBUY'
'X'.
perform bdc_field using 'SO_BBUY-LOW'
'TEST_00035'.
it_bonusbuy1-bbynr.
it_bonusbuy-bbynr.
endif.
clear it_bonusbuy1.
ENDLOOP.
*Refresh: it_bonusbuy1.
clear bdcdata.
call transaction 'WPMA' using bdcdata
mode lv_mode
UPDATE 'S'
messages into it_bdcmsgcoll.
refresh bdcdata.
clear it_bonusbuy.
endloop.
l_endt = sy-uzeit.
break retaildev.
select docnum
direct
credat
cretim
mestyp
idoctp
from edidc into corresponding fields of table it_edidc
where
credat = l_cdate and
( cretim ge l_startt and cretim le l_endt ) and
mestyp = 'WPDBBY' and
idoctp = 'WPDBBY01'. " " l_startt and l_endt and
break retaildev.
if sy-subrc = 0.
select docnum
counter
segnum
segnam
sdata
from edid4 into corresponding fields of table it_edid4 for all entries in it_edidc
where
docnum = it_edidc-docnum.
endif.
*Loop at it_final into wa_final.
loop at it_edid4 into wa_edid4 where segnam = 'E1WPBB01'.
wa_final-store = wa_edid4-sdata(10).
wa_final-docnum = wa_edid4-docnum.
wa_final-bbynr = wa_edid4-sdata+10(12).
append wa_final to it_final.
endloop.
delete adjacent duplicates from it_final comparing docnum store bbynr.
sort it_final by store.
clear: wa_final,wa_edidc, wa_edid4.
refresh : it_edid4, it_edidc.
*ALV OutPut
write :'Following are the Idocs posted successfully Storewise' .
loop at it_final.
write : it_final-store , it_final-docnum , it_final-bbynr .
endloop.
*Break retaildev.
perform top_of_page.
perform alv_layout-settings.
perform zalv_fieldcatpopn using it_fcat.
perform z_reuse_alv_grid_display.Have you tried serialization and sendingas an object using something like Zend AMF?
Please mark this question as answered if this works for you.
-Mr.12 -
Dear All,
We have developed some customized z-transactions related to standard MIGO
transaction for our Barcode Implementation project so that they can
run on Hand held terminals(HHT) as HHT doesnot Support SAP GUI (for ex : table controls, Tab strips etc.,)
The HHT is connected to SAP console via Telnet.
And we have used some BDCs which are developed using recording (SHDB) in these
customised transactions.
Transactions along with BDC's are working absolutely fine when running on SAP GUI (Desktop computers) .
But when we run these transactions on SAP console and while executing BDC's, it shows
the follwing Message and BDC's doesn't work on sap console.
Message Type - A
Message ID - CNDP
Message No - 003
Message - Function DP_PUT_CLIENT_TABLE45A is not available
Message status- TO is not created
regards,
Rahul ShuklaHello
The link you have provided is not working. And Have identical problem in completely different context.
I'm trying to use GUILIB.DLL to command GUI from Visual Basic.
To do it I had to write a DLL whish is changing the call covention to VB one. The DLL is just wrapping all exports.
Everyting works fine with Z-transactions and e.g. VD51 but
in VA01 or VD02, after filling the first screen with data sending the Event I get this error (DP_PUT_CLIENT_TABLE45A not available) after calling It_GetEvent.
DO you know any remedy (my patch level is 57 on 6.20 GUI)
thanks in advance for help
Stefan -
I am new to the bdc .
i have gone to SHDB and created a new recording for the some T-code .
After that i have created a prog (transfer from recording ) .
i got some values in the file in my presenation server.
i got default code generated .
I have to declare the internal table of some time .
may i know of which type should i declare my internal table ??
My code ****************************************************************
report ZRAJESH_BDC
no standard page heading line-size 255.
include bdcrecx1.
start-of-selection.
perform open_group.
*******loop
perform bdc_dynpro using 'SAPMF02K' '0101'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-D0110'.
perform bdc_field using 'RF02K-LIFNR'
'12345'.
perform bdc_field using 'RF02K-D0110'
'X'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-TELF2'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFA1-ANRED'
'Mr.'.
perform bdc_field using 'LFA1-NAME1'
'RAJESH'.
perform bdc_field using 'LFA1-SORTL'
'Q'.
perform bdc_field using 'LFA1-LAND1'
'US'.
perform bdc_field using 'LFA1-SPRAS'
'EN'.
perform bdc_field using 'LFA1-TELF2'
'9033558227'.
perform bdc_transaction using 'XK02'.
perform close_group.
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 <> NODATA.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.Hi,
I have one simple BDC Program .
Just you have to do recording by using SHDB Transaction Code.
and Copy that program and do some modification by following my Program and upload data to that perticular transaction.
before that u have to prepare data in Text file by using TAB Space .
Below is the Code(I have used MM01 transaction)
******************************************************************************************8
report ZBDCTEST no standard page heading line-size 255.
***DECLARING TABLES.
TABLES : MARA.
**DECLARING INTERNAL TABLE.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
MATKL LIKE MARA-MATKL,
Maktx like makt-maktx,
SPART LIKE MARA-SPART,
END OF ITAB.
DATA BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
CODEPAGE = 'IBM'
FILENAME = 'C:\TEST.TXT'
FILETYPE = 'DAT'
HEADLEN = ' '
LINE_EXIT = ' '
TRUNCLEN = ' '
USER_FORM = ' '
USER_PROG = ' '
DAT_D_FORMAT = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = ITAB
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10
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.
*perform open_group.
LOOP AT ITAB.
REFRESH BDCDATA.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1_REF-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'=AUSW'.
perform bdc_field using 'RMMG1-MATNR'
ITAB-MATNR.
perform bdc_field using 'RMMG1-MBRSH'
'M'.
perform bdc_field using 'RMMG1-MTART'
'FOOD'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(02)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_field using 'MSICHTAUSW-KZSEL(02)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4000'.
perform bdc_field using 'BDC_OKCODE'
'=SP02'.
perform bdc_field using 'MAKT-MAKTX'
'T1003'.
perform bdc_field using 'BDC_CURSOR'
'MARA-MATKL'.
perform bdc_field using 'MARA-MEINS'
'BOX'.
perform bdc_field using 'MARA-MATKL'
ITAB-MATKL.
perform bdc_field using 'MARA-SPART'
ITAB-SPART.
perform bdc_field using 'MARA-MTPOS_MARA'
'NORM'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
perform bdc_field using 'MAKT-MAKTX'
'T1003'.
*perform bdc_transaction using 'MM01'.
*perform close_group.
CALL TRANSACTION 'MM01' USING BDCDATA MODE 'A'. "A= all screens ,N= no screens
ENDLOOP.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL <> SPACE.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDIF.
ENDFORM.
if you want further help let me know
Regards,
Jak -
Is it possible to skip the screen in BDC using IF statement.
Hi Friends,
I have written a report using BDC for tcode CO11 thru recording using CALL TRANSACTION.
Case 1:
If I go to transaction CO11 (screen number 100) and give the order number which has more than 1 operations to be partially confirmed and press ENTER a pop-up screen (screen number 140) appears where in I need to select the operation number and after selecting the required operation number it automatically takes me to another screen (screen number 150).
Case 2:
If I go to transaction CO11 (screen number 100) and give the order number which has only 1 operation to be partially confirmed and press ENTER it directly takes me to screen 150 skiping screen 140.
When I enter the order number which has more than 1 operations to be partially confirmed on my selection screen, my code is working fine as needed.
But, when I enter the order number which has 1 operation to be partially confirmed on my selection screen, it is giving me error in my BDCMSGCOLL saying that the screen 140 doesn't exist.
Is there any way, Can I skip screen 140 using IF statement?
My thoughts:
1. calling screen 100.
After calling screen 100, I have put the pop-up operation numbers in an ITAB.
DESCRIBE table lines ITAB <variable>.
At NEW <order-field>.
IF <variable> = 1.
2. calling screen 140. "I need some help here to skip the screen 140
" Will this logic work?
ENDIF.
ENDAT.
3. calling screen 150.
Rest everything is working fine.
Will my above logic works correctly? I would appreciate if someone could help me with this.
Thanks in Advance.Hi,
Try something like this:
1. Call Screen 100.
Check if screen 140 needs to be called depending on your custom logic. Lets say you populate a variable as 'X' if it needs to be called.
Then write:
if valiable = 'X'.
Call screen 140.
Enter Screen 140 details.
endif.
Call screen 150.
Here the 'Call Screen' is nothing but the code you extracted after BDC recording.
Thanks.
Ravi' -
BDC Call Transaction - Doc.No not getting generated in Message Internal tab
Dear All,
I am using BDC Call Transaction method for uploading data for transaction, Iam able to successfully capture the Error messages, sucess messages and the transaction number is also displayed for the bdc run in Mode A, but in case of scheduling the job in background, the Error messages are displayed but the transaction number is not captured in the message Internal table( BDCMSGCOLL).
Kindly look into the matter and revert back for any further info.
Regards
NareshHi,
Please try using the following kind of code in 'CALL TRANSACTION'
opt-dismode = 'E'. " Exclusive mode
opt-defsize = 'X'.
opt-updmode = 'S'.
opt-nobinpt = ' '.
CALL TRANSACTION transaction_code USING ft OPTIONS FROM opt
MESSAGES INTO t_bdcmsgcoll .
Hope this will work.
Thanks,
Leo -
Field not getting updated in BDC while running in background
Hi Friends,
I'm executing a BDC transaction to update the Alternate Tax Classification (VBAK_TAXK1) field in Sales Order. I'm passing value 1 to the field and then saving it directly. While running the BDC in background, the field is not getting updated. On the other hand i checked it running in foreground, the field got updated without any error message.
Can anybody help me advicing why the field is not getting updated in background?
Thanks,
BestinHi ,
Check the the log if you are using a session method and if call transaction then capture the messages for the same,
Because in the foreground the BDC will update the records even if there is a warning message nut in background it will not update. So check the data which you are inserting and try avoid the warning messages also so that it can run smoothly in backfround.
Thanks & Regards
Jyo
Maybe you are looking for
-
After updating my IPAD The sounds no longer work.
IPad no longer has sound after updating to new version.
-
I have string of columns and arithmetic operators stored in a variable. Is there a way to get the result after calculation? Eg. Declare l_str varchar2(1000) := ':jv_d.amt_dr - :jv_d.amt_disc'; l_str2 varchar2(1000) := '(:jv_d.amt_dr - :jv_d.amt_disc)
-
Photoshop elements 4 on a ibook g4 running 10.5.8 (not intel)
after upgrading to 10.5.8 i have discovered my photoshop 7 program, which i have used for yrs, will not run on this op system. i am looking for the correct version of adobe photoshop elements to buy for an non-intel computer running mac os 10.5.8...
-
LR 4 Beta Installer reports Not Enough Disk Space before prompting for installation location
Would be nice it the LR installer prompted for a install location before reporting that there is not enough disk space. While there is not alot of space on my system drive, there is 400MB on the disk I wanted to install it to. (Running XP)
-
Crash on exporting to PDF?
I occasionally am working in an environment where I need to save my Pages documents to PDF so I can put them on a memory stick to print them from a Windoze machine. I have not been able to set up a Keyboard Shortcut for this, have been using Print>PD