BDC for LINE Item
hi abaper's
i have to do BDC for vendor line item i have 250 vendor and 1000 line item for these vendor
so please tell me the procedure.
thanks
pardeep
Hi,
Check the sample code.
REPORT YJAR_VENDOR_INBOUND02 NO STANDARD PAGE HEADING LINE-SIZE 255
MESSAGE-ID ZABC.
STRUCTURE DEFINITIONS :
TYPES : BEGIN OF TY_SOURCE ,
LIFNR TYPE LIF16 ,
BUKRS TYPE BUKRS ,
EKORG TYPE EKORG ,
KTOKK TYPE KTOKK ,
NAME1 TYPE AD_NAME1 ,
SORTL TYPE AD_SORT1 ,
LAND1 TYPE LAND1 ,
BANKS TYPE BANKS ,
BANKL TYPE BANKK ,
BANKN TYPE BANKN ,
AKONT TYPE AKONT ,
FDGRV TYPE FDGRV ,
WAERS TYPE BSTWA ,
END OF TY_SOURCE ,
BEGIN OF TY_HEADER ,
LIFNR TYPE LIF16 ,
BUKRS TYPE BUKRS ,
EKORG TYPE EKORG ,
KTOKK TYPE KTOKK ,
NAME1 TYPE AD_NAME1 ,
SORTL TYPE AD_SORT1 ,
LAND1 TYPE LAND1 ,
AKONT TYPE AKONT ,
FDGRV TYPE FDGRV ,
WAERS TYPE BSTWA ,
END OF TY_HEADER ,
BEGIN OF TY_ITEM ,
LIFNR TYPE LIF16 ,
BANKS TYPE BANKS ,
BANKL TYPE BANKK ,
BANKN TYPE BANKN ,
END OF TY_ITEM .
INTERNAL TABLE AND WORK AREA DEFINITIONS :
DATA : T_SOURCE TYPE STANDARD TABLE OF TY_SOURCE INITIAL SIZE 1 ,
W_SOURCE TYPE TY_SOURCE ,
W_SOURCE1 TYPE TY_SOURCE ,
T_TARGET TYPE STANDARD TABLE OF BDCDATA INITIAL SIZE 1 ,
W_TARGET TYPE BDCDATA ,
T_HEADER TYPE STANDARD TABLE OF TY_HEADER INITIAL SIZE 1 ,
W_HEADER TYPE TY_HEADER ,
T_ITEM TYPE STANDARD TABLE OF TY_ITEM INITIAL SIZE 1 ,
W_ITEM TYPE TY_ITEM ,
I(2) TYPE C ,
FNAM(20) .
UPLOADING FLATFILE TO SOURCE INTERNAL TABLE :
PERFORM SUB_UPLOAD_FLATFILE.
PERFORM SUB_SPLIT_DATA.
*include bdcrecx1.
*start-of-selection.
*perform open_group.
LOOP AT T_HEADER INTO W_HEADER .
REFRESH T_TARGET .
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0100'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RF02K-KTOKK'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'RF02K-LIFNR' W_HEADER-LIFNR.
PERFORM BDC_FIELD USING 'RF02K-BUKRS' W_HEADER-BUKRS.
PERFORM BDC_FIELD USING 'RF02K-EKORG' W_HEADER-EKORG.
PERFORM BDC_FIELD USING 'RF02K-KTOKK' W_HEADER-KTOKK.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0110'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFA1-LAND1'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'LFA1-NAME1' W_HEADER-NAME1.
PERFORM BDC_FIELD USING 'LFA1-SORTL' W_HEADER-SORTL.
PERFORM BDC_FIELD USING 'LFA1-LAND1' W_HEADER-LAND1.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0120'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFA1-KUNNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFBK-BANKL(02)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' 'ENTR'.
I = '01' .
LOOP AT T_ITEM INTO W_ITEM WHERE LIFNR = W_HEADER-LIFNR .
CONCATENATE 'LFBK-BANKS(' I ')' INTO FNAM .
PERFORM BDC_FIELD USING FNAM W_ITEM-BANKS.
CONCATENATE 'LFBK-BANKL(' I ')' INTO FNAM .
PERFORM BDC_FIELD USING FNAM W_ITEM-BANKL.
CONCATENATE 'LFBK-BANKN(' I ')' INTO FNAM .
PERFORM BDC_FIELD USING FNAM W_ITEM-BANKN.
I = I + 1 .
IF I GT 5 .
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' 'P+'.
I = '01'.
ENDIF.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0130'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFBK-BANKS(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTR'.
ENDLOOP .
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0210'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFB1-FDGRV'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'LFB1-AKONT' W_HEADER-AKONT.
PERFORM BDC_FIELD USING 'LFB1-FDGRV' W_HEADER-FDGRV.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0215'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFB1-ZTERM'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0220'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFB5-MAHNA'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0310'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'LFM1-WAERS'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'LFM1-WAERS' W_HEADER-WAERS.
PERFORM BDC_DYNPRO USING 'SAPMF02K' '0320'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'RF02K-LIFNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=ENTR'.
PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0300'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=YES'.
*perform bdc_transaction using 'XK01'.
*perform close_group.
CLEAR W_HEADER .
CALL TRANSACTION 'XK01'
USING T_TARGET
MODE 'A'.
ENDLOOP .
*& Form SUB_UPLOAD_FLATFILE
THIS SUBROUTINE IS USED TO UPLOAD THE FLATFILE TO SOURCE INTERNAL TABLE
FORM SUB_UPLOAD_FLATFILE .
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'E:/FLATFILE.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = T_SOURCE
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
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. " SUB_UPLOAD_FLATFILE
*& Form SUB_SPLIT_DATA
THIS SUBROUTINE IS USED TO SPLIT DATA FROM SOURCE INTERNAL TABLE TO
HEADER AND ITEM INTERNAL TABLE
FORM SUB_SPLIT_DATA .
LOOP AT T_SOURCE INTO W_SOURCE .
W_SOURCE1 = W_SOURCE .
AT NEW LIFNR .
W_HEADER-LIFNR = W_SOURCE1-LIFNR.
W_HEADER-BUKRS = W_SOURCE1-BUKRS.
W_HEADER-EKORG = W_SOURCE1-EKORG.
W_HEADER-KTOKK = W_SOURCE1-KTOKK.
W_HEADER-NAME1 = W_SOURCE1-NAME1.
W_HEADER-SORTL = W_SOURCE1-SORTL.
W_HEADER-LAND1 = W_SOURCE1-LAND1.
W_HEADER-AKONT = W_SOURCE1-AKONT.
W_HEADER-FDGRV = W_SOURCE1-FDGRV.
W_HEADER-WAERS = W_SOURCE1-WAERS.
APPEND W_HEADER TO T_HEADER .
ENDAT .
W_ITEM-LIFNR = W_SOURCE-LIFNR .
W_ITEM-BANKS = W_SOURCE-BANKS .
W_ITEM-BANKL = W_SOURCE-BANKL.
W_ITEM-BANKN = W_SOURCE-BANKN.
APPEND W_ITEM TO T_ITEM .
CLEAR W_HEADER.
CLEAR W_ITEM .
ENDLOOP.
ENDFORM. " SUB_SPLIT_DATA
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR W_TARGET.
W_TARGET-PROGRAM = PROGRAM.
W_TARGET-DYNPRO = DYNPRO.
W_TARGET-DYNBEGIN = 'X'.
APPEND W_TARGET TO T_TARGET.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
IF FVAL SPACE.
CLEAR W_TARGET.
W_TARGET-FNAM = FNAM.
W_TARGET-FVAL = FVAL.
APPEND W_TARGET TO T_TARGET.
ENDIF.
ENDFORM. "BDC_FIELD
****************FLAT FILE FORMAT***********************
1000-56 1000 1000 0001 ABC-01 TC IN US 123445678 123456 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 234567 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345678 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345679 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345670 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345671 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345672 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345673 31000 A1 INR
1000-56 1000 1000 0001 ABC-01 TC IN US 123123123 345674 31000 A1 INR
Regards,
Raj.
Similar Messages
-
BDC For Line Items In Sales Order
Hello,
I have an internal table of line items which i need it to pass it to BDC for sales order line items creation. Can anybody tell me how to do this like the logic which is used to pass the field names. I just have the material number and Quantity to be passed ..
Thanks
VikySee below code for Purchase Order :
report zpochange.
data : i_error like bdcmsgcoll occurs 0 with header line.
data : i_bdcdata like bdcdata occurs 0 with header line.
tables : ekko, ekpo.
data :c1(10) value 'ME22',
c2(1) value ',',c3(10).
data : var1(20). " LIKE EKKO-EBELN.
data : var2 like ekko-ebeln.
data : begin of i_ekko occurs 0,
header(2),
ebeln like ekko-ebeln,
end of i_ekko.
data : begin of i_ekpo occurs 0,
item(2),
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
menge(10), " LIKE EKPO-MENGE,
end of i_ekpo.
data : v like ekpo-ebelp.
data: begin of itab occurs 0,
text(300),
end of itab.
parameters: p_file like ibipparms-path.
*PARAMETERS: PONUMBER LIKE EKPO-EBELN.
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
importing
file_name = p_file
start-of-selection.
*SELECT EBELN FROM EKKO INTO TABLE I_EKKO WHERE EBELN = PONUMBER.
SELECT EBELN EBELP MENGE FROM EKPO INTO TABLE I_EKPO WHERE EBELN
*= PONUMBER.
perform get_data.
*LOOP AT ITAB.
WRITE :/ ITAB.
ENDLOOP.
loop at itab.
var1 = itab-text+0(1).
if var1 = 'H'.
*I_EKKO-EBELN = ITAB-TEXT.
split itab at c2 into i_ekko-header
i_ekko-ebeln.
SPLIT ITAB AT ',' INTO I_EKKO-EBELN.
" I_EKPO-EBELP
" I_EKPO-MENGE
" var1.
append i_ekko.
else.
split itab at c2 into i_ekpo-item
i_ekpo-ebeln
i_ekpo-ebelp
i_ekpo-menge.
append i_ekpo.
endif.
*var2 = i_ekpo-ebeln.
MOVE VAR1 TO I_EKPO-EBELN.
MOVE VAR1 TO I_EKKO-EBELN.
APPEND: I_EKPO.
*if not var1 is initial.
split var1 at ',' into i_ekpo-ebelp
i_ekpo-menge.
i_ekpo-ebeln = var2.
append i_ekpo.
*endif.
endloop.
loop at i_ekpo.
write :/ i_ekpo.
endloop.
loop at i_ekko.
perform fill_data. " TABLES I_EKPO.
endloop.
LOOP AT I_EKPO.
WRITE :/ I_EKPO.
ENDLOOP.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
*LOOP AT I_ERROR.
WRITE :/ I_ERROR.
ENDLOOP.
form get_data.
call function 'WS_UPLOAD'
exporting
codepage = ' '
filename = p_file
filetype = 'ASC'
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.
endform. " GET_DATA
*& Form FILL_DATA
text
-->P_I_EKPO text
form fill_data. " tables i_ekpo .
perform bdcscreen using 'SAPMM06E' '0105'.
perform bdcfield using 'RM06E-BSTNR' i_ekko-ebeln.
perform bdcfield using 'BDC_OKCODE' '/00'.
loop at i_ekpo where ebeln = i_ekko-ebeln.
V = I_EKPO-EBELP.
perform bdcscreen using 'SAPMM06E' 0120.
perform bdcfield using 'BDC_CURSOR' 'RM06E-EBELP'.
perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
perform bdcfield using 'BDC_OKCODE' '/00'.
perform bdcscreen using 'SAPMM06E' 0120.
perform bdcfield using 'BDC_CURSOR' 'EKPO-MENGE(01)'.
perform bdcfield using 'RM06E-EBELP' i_ekpo-ebelp.
perform bdcfield using 'EKPO-MENGE(01)' i_ekpo-menge.
perform bdcfield using 'BDC_OKCODE' '/00'.
*PERFORM BDCSCREEN USING 'SAPMM06E' 0120.
*PERFORM BDCFIELD USING 'BDC_CURSOR' 'RMO6E-EBELP'.
*CLEAR V.
endloop.
perform bdcfield using 'BDC_OKCODE' '=BU'.
call transaction c1 using i_bdcdata mode 'A'
messages into i_error.
refresh i_bdcdata.
endform. " FILL_DATA
*& Form BDCSCREEN
text
-->P_0140 text
-->P_0120 text
form bdcscreen using p_program p_screen.
i_bdcdata-program = p_program.
i_bdcdata-dynpro = p_screen.
i_bdcdata-dynbegin = 'X'.
append i_bdcdata.
clear i_bdcdata.
endform. " BDCSCREEN
*& Form BDCFIELD
text
-->P_0145 text
-->P_I_EKPO_EBELN text
form bdcfield using fnam fval.
i_bdcdata-fnam = fnam.
i_bdcdata-fval = fval.
append i_bdcdata.
clear i_bdcdata.
endform. " BDCFIELD
I hope same thing for sales order ,i mean both has Table control
Reward Points if it is helpful
Thanks
Seshu -
Problem in bdc for table control for line items
Hi experts,
I am runnig a bdc for ME52.
i am just entering PR number, in the second screen i have got all the line items. I need to select these line item 10 and double click or hit enter, it takes me to screen 3, there im just checking a checkbox and saving.
Again i need to select the line item 20 and double click or hit enter. again the same process.
Again repeat for all the line items.
But my problem is it is updating everytime for only line item 10. for line item 20 and others it say "no chnge in the data".
I am pasting my code here. please check and revert me back .plz.
DATA: w_output LIKE LINE OF i_output.
REFRESH I_ITAB[].
SELECT * FROM EBAN
INTO TABLE i_itab
WHERE banfn in s_banfn AND
bsart in s_bsart AND
bstyp in s_bstyp AND
matnr in s_matnr AND
werks in s_werks AND
lfdat in s_lfdat AND
pstyp in s_pstyp AND
knttp in s_knttp AND
estkz in s_estkz AND
loekz eq ' '.
IF sy-subrc = 0.
CLEAR: w_itab,
i_poitab[].
SORT i_itab by banfn.
LOOP AT i_itab INTO w_itab where menge GT eban-bsmng.
IF p_close = 'X' AND p_rep = 'X'.
IF w_itab-ebakz = 'X'.
w_itab-ebakz = ' '.
APPEND w_itab to i_poitab.
ENDIF.
ELSEIF p_open = 'X' AND p_rep = 'X'.
IF w_itab-ebakz = ' '.
w_itab-ebakz = 'X'.
APPEND w_itab to i_poitab.
ENDIF.
ELSEIF p_close = 'X' AND p_repw = 'X'.
IF w_itab-ebakz = ' '.
APPEND w_itab to i_poitab.
ENDIF.
ELSEIF p_open = 'X' AND p_repw = 'X'.
IF w_itab-ebakz = 'X'.
APPEND w_itab to i_poitab.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT i_poitab into w_output.
APPEND w_output to i_output.
PERFORM CALL_BDC.
endloop.
IF p_rep = 'X'.
PERFORM CALL_BDC.
ENDIF.
ENDFORM. " GET_DATA
*& Form CALL_BDC
text
--> p1 text
<-- p2 text
FORM CALL_BDC.
DATA: seltab(5) TYPE N,
seltab1(2) TYPE N,
tempvar(30) TYPE N,
cnt TYPE N.
LOOP AT i_output.
clear: seltab,
seltab1.
seltab = i_output-bnfpo.
seltab1 = seltab+2(2).
perform bdc_dynpro using 'SAPMM06B' '0105'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BANFN'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'EBAN-BANFN'
i_output-banfn.
perform bdc_dynpro using 'SAPMM06B' '0106'.
clear tempvar.
*cnt = 1.
concatenate 'EBAN-BNFPO(' seltab1 ')' into tempvar.
perform bdc_field using 'BDC_CURSOR'
'EBAN-BNFPO(seltab1)'.
tempvar.
perform bdc_field using 'BDC_OKCODE'
'=DETA'.
perform bdc_field using 'RM06B-BNFPO'
i_output-bnfpo.
perform bdc_field using 'RM06B-TCSELFLAG(seltab1)'
'X'.
perform bdc_dynpro using 'SAPMM06B' '0102'.
perform bdc_field using 'BDC_CURSOR'
'EBAN-EBAKZ'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'EBAN-EBAKZ'
i_output-ebakz.
CALL TRANSACTION 'ME52' USING bdc_data MODE 'A'
MESSAGES INTO i_bdcmsg.
COMMIT WORK AND WAIT.
ENDLOOP.
ENDFORM. " CALL_BDC
*& Form bdc_dynpro
text
-->P_0686 text
-->P_0687 text
FORM bdc_dynpro USING program dynpro.
CLEAR bdc_data.
bdc_data-program = program.
bdc_data-dynpro = dynpro.
bdc_data-dynbegin = 'X'.
APPEND bdc_data.
CLEAR bdc_data.
ENDFORM.
thanks,
NLooks like table control logic is wrong -- do compare with below program...
only table contril area
REPORT ZPadmam
NO STANDARD PAGE HEADING LINE-SIZE 255.
DATA : BEGIN OF itab OCCURS 0,
i1 TYPE i,
lifnr LIKE rf02k-lifnr,
bukrs LIKE rf02k-bukrs,
ekorg LIKE rf02k-ekorg,
ktokk LIKE rf02k-ktokk,
anred LIKE lfa1-anred,
name1 LIKE lfa1-name1,
sortl LIKE lfa1-sortl,
land1 LIKE lfa1-land1,
akont LIKE lfb1-akont,
fdgrv LIKE lfb1-fdgrv,
waers LIKE lfm1-waers,
END OF itab.
DATA : BEGIN OF jtab OCCURS 0,
j1 TYPE i,
banks LIKE lfbk-banks,
bankl LIKE lfbk-bankl,
bankn LIKE lfbk-bankn,
END OF jtab.
DATA : cnt(4) TYPE n.
DATA : fdt(20) TYPE c.
DATA : c TYPE i.
INCLUDE bdcrecx1.
START-OF-SELECTION.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\first1.txt'
filetype = 'DAT'
TABLES
data_tab = itab.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
filename = 'C:\second.txt'
filetype = 'DAT'
TABLES
data_tab = jtab.
LOOP AT itab.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
itab-lifnr.
PERFORM bdc_field USING 'RF02K-BUKRS'
itab-bukrs.
PERFORM bdc_field USING 'RF02K-EKORG'
itab-ekorg.
PERFORM bdc_field USING 'RF02K-KTOKK'
itab-ktokk.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-LAND1'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFA1-ANRED'
itab-anred.
PERFORM bdc_field USING 'LFA1-NAME1'
itab-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
itab-sortl.
PERFORM bdc_field USING 'LFA1-LAND1'
itab-land1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
cnt = 0.
LOOP AT jtab WHERE j1 = itab-i1.
cnt = cnt + 1.
CONCATENATE 'LFBK-BANKS(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-banks.
CONCATENATE 'LFBK-BANKL(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankl.
CONCATENATE 'LFBK-BANKN(' cnt ')' INTO fdt.
PERFORM bdc_field USING fdt jtab-bankn.
IF cnt = 5.
cnt = 0.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKN(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
ENDIF.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-FDGRV'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFB1-AKONT'
itab-akont.
PERFORM bdc_field USING 'LFB1-FDGRV'
itab-fdgrv.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LFM1-WAERS'
itab-waers.
PERFORM bdc_dynpro USING 'SAPMF02K' '0320'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-LIFNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0300'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
PERFORM bdc_transaction USING 'XK01'.
ENDLOOP.
PERFORM close_group.
Thanks
Seshu -
PROBLEM IN QP01 BDC ( 19TH LINE ITEM IS NOT TAKING)
DEAR ALL,
I am working on a bdc of QP01 for inspection plan, my bdc is working prperly , problem is that in sceen there r 18 lines for line items , but i have 30 line items. after 18 line items no data is picking. and a message is coming no input data is there for screen no 0150. i tried a lot and unable to solve . if anybody can solve my problem . i send u the part of my code.
LOOP AT ITAB.
CHECK ITAB-MATNR = ITAB1-MATNR.
if flag = 1.
** QUALITATIVE **
if itab-QUALITAT = 'X' AND itab-QUANTITAT = ''.
IF I ge 18.
*CONCATENATE 'RQPAS-SEL_FLG(' I ')' INTO SCR.
*perform bdc_field using SCR
X = '17'..
CONCATENATE 'RQPAS-SEL_FLG(' X ')' INTO SCR.
perform bdc_field using SCR
X1 = '18'..
CONCATENATE 'RQPAS-SEL_FLG(' X ')' INTO SCR.
perform bdc_field using SCR
X2 = '340'.
CONCATENATE 'RQPAS-SEL_FLG(' X1 ')' INTO SCR.
perform bdc_field using SCR
PERFORM BDC_DYNPRO USING 'SAPLQPAA' '0150'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'RQPAS-QUALITAT(02)'.
PERFORM BDC_FIELD USING 'RQPAS-ENTRY_ACT'
'1'.
i.
PERFORM BDC_FIELD USING 'RQPAS-AB_MKNR'
ITAB-MERKNR .
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
endif.
perform bdc_dynpro using 'SAPLQPAA' '0150'.
perform bdc_field using 'BDC_CURSOR'
'PLMKB-VERWMERKM(01)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RQPAS-ENTRY_ACT'
'1'.
k = i - 1.
CONCATENATE 'RQPAS-SEL_FLG(' k ')' INTO SCR.
perform bdc_field using SCR
CONCATENATE 'RQPAS-SEL_FLG(' i ')' INTO SCR.
perform bdc_field using SCR
'X'.
***perform bdc_field using 'BDC_OKCODE'
'/00'.
***'=QMLM'.
CONCATENATE 'PLMKB-VERWMERKM(' I ')' INTO SCR.
perform bdc_field using scr "'PLMKB-VERWMERKM(01)'
'DS-TH-01'.
itab-VERWMERKM.
CONCATENATE 'PLMKB-KURZTEXT(' I ')' INTO SCR.
perform bdc_field using scr
itab-KURZTEXT.
regards
banajabut i want to try it out by modifying the existing code.
please provide me guidelines to solve this problem. -
Error Handling in table control for line item.
Hi,
Please how to do error handling in table control for line item in bdc,i have used format_message for header but i don't no fill decamps internal tabled and how to do background processing in call transaction.
ThanksBackground processing is not possible using call transaction method.
You can create an executable program which can have CALL TRANSACTION BDC code. And this can be run in background.
What do you exactly mean by Error handling for Items in table control. Can you give some more details. -
Tcode for line item settlement other than tcode CJIC
Dear SAP Guru,
Please let me know the tcode for line item settlement other than tcode CJIC.
Required urgently.
Thanks & regards,
Pradip ShelkeThanks for your reply.
Actually we are trying to create the BDC program for line item settlement. Through both the tcode CJIC & CJ70 this BDC program is not getting created.
So please suggest some other tcode.
Thanks & Regards,
Pradip Shelke -
Changing the default view for Line Items in an Auction.
Hello All,
We have a version 5 client who is asking for us to change the default view for line items in an auction.
Currently, if you have an auction setup, and you go to the Line Items tab, the default view is the "Basic View". The client would like to change the Default from "basic view" to "price view".
Is there a way to change this default in the system? Can this be configured using query groups? Any information would be helpful.Hi wood cloud,
This is not possible, bcz there is no VLV for that drop down and we cant set it to the price view.
Thanks,
Ankur Goyal -
No control line for line item - error while posting bd to accounting
Hi all,
Billing document showing err "no control line for line item" while posting to accounting doc.Sales document is complete no in completion logs.
Previous errr: g/l missing for line item" in order incompletion after maintaining company code for customer, then refresh the g/l missing for line item is no more logs and showing the error "no control line for line item" while posting bd to accts.
Please help
Regards
anushHello Anush,
if the company data of the payer was not created when the sales order has been created, then the system could not create the correct records in table VBREVK. Once the company data has been maintained the VBREVK records could be corrected by re-saving the sales, but only if no billing document exists.
In your case you already created the billing document.
Please try these step:
1. reverse billing document
2. run VA02 add a blank char to PO number, save
3. create new billing document
Best regards,
Ivano. -
GR of Delivery completed item not possible for line item of PO/SA ?
Hi,
Am unable to Receive Goods in MIGO an Error - "GR of delivery completed item not possible for line item of PO/SA"?
Regards
Mohammed Khaja Pasha
+919550917395.Hi Mohammed Khaja Pasha ;
Delivery Completed checkbox provides a lot of fonctionality like an additional delivery is not expected, but is possible. If you prevent posting of migo , you can benefit from system messages M7 163 and 254.
You want to ensure that the delivery is made before the planned delivery date : Set message 254.
You want to ensure last possible delivery date : Set message 163.
However ;
The open PO quantity of the PO item equals zero.
The PO item is no longer relevant for materials planning.
The PO item is ignored when letters urging delivery of overdue goods are generated.
The PO item can be deleted and archived.
You can specify whether the Delivery Completed checkbox is to be selected automatically.
Regards.
M.Ozgur Unal -
How to print vertical lines for line items?
hi experts,
can any one tell me how to print vertical lines for line items in ascript?
ive tried using sy-vline but its printing jus one line each for each item .i want it in columns ?if there are any control commands plz let me know how to print?
thanks ®ards
narendarhi narendar,
Welcome to SDN.
u can go for box command.
Use the box command with zero width for vertical lines.
Position the line by x position and y postion.
syntax :
BOX <xpos> <ypos>
<width>
<height>
<thickness in twips> twips.
Regards,
Arun.
Reward points if useful. -
New DataSources for Line Items from FI-GL, FI-AP, FI-AR
Dear Experts,
Kindly sugest the SAP Note's and SAP Document links on New DataSources for Line Items from FI-GL, FI-AP, FI-AR
for( 0FI_GL_14, 0FI_AR_14, 0FI_AP_14 ). and what is the advantage of using this data sources.
Currently we are using the Data Sources with ( 0FI_GL_4, 0FI_AR_4, 0FI_AP_4 ) and we want to migrate to ( 0FI_GL_14, 0FI_AR_14, 0FI_AP_14 ).
Please sugest in this regard.
Thanks&Regards,
Nagendra prasad.
Edited by: nagendra prasad on Jul 20, 2010 5:12 AM
Edited by: nagendra prasad on Jul 20, 2010 6:05 AMHi
Please find FI_GL_14 related links
[http://help.sap.com/saphelp_nw70/helpdata/en/49/5700570223413085021a8b4ef1087a/frameset.htm]
[http://help.sap.com/saphelp_nw70/helpdata/en/45/4f8e8bbf3f4f63a5dd197ef7d53fa2/frameset.htm]
There is no FI_AR_14 and FI_AP_14. If you want more information directly goto help.sap.com you will find all the details.
Regards
YuvaraajP -
Hi,
I have customized the change rules for Line item.
Still the system not allowing to make changes to that particular field? Can any one tell me, whats the reason for the same.
Following Field is made as changeable for the line item.
BSEG-VBUND Trading partner.
The above field is available in More data Tab or additional data tab while making entry or display of document.
Thanks,
LalatenduHi,
That i know, but trading partner was not entered in the GL Master data. Infact some one wrongly entered Trading partner in Customer master and during bank posting system automatically picked Trading partner.
When thye r trying to clear open items for that GL account , because of that assignment system is not allowing to clear those line item.
If i can remove that trading partner from document, my problem will be solved.
Can any one guide me..or if u need more info please let me know.
Thanks,
Lalatendu -
Create delivery document for line item 5 only manually
Hi Sap Experts,
We have scenario, we have created sales order with 10 line items while creating delivery we don’t want to show all the 10 line item to delivery creator (creating delivery manually).
We will send him mail saying that create delivery document for line item 5 and we will provide him material number and delivery date and shipping point with sales order number.
We don’t want to use partial delivery option that split the delivery and we don’t want to use VL10C tcode also.
What are options we have and how to customize this scenario?
Kindly suggest.
Regards,
KotliCan you be clear in your requirement?
One requirement is user should not select line items other than the one instructed to them
The other requirement is delivery split should happen based on item category
If your requirement is first one, you need to go with user exit USEREXIT_MOVE_FIELD_TO_LIPS in include MV50AFZ1 but I am not sure, on what logic, coding to be included in this exit. If your requirement is second one, then just try in your system and share the outcome how system is functioning. You will come to know how standard SAP works.
G. Lakshmipathi -
Adding a characteristics to AR Drill down report for line items
I have raised an OSS note on this, but they deem this to be consulting.
I have an AR drill down report for line items
It calls the structure RFRRD20.
I need to add a value into the characteristics so I can use it in the drill down report.
I have appended the structure, added a value in TKAF for the field, and it still does not show.
Has anybody done something similar?
I am sure this is easy, but only when you know how, so if you know how to do it please can you let me know.
thanks
MarkHi Mark
I am also in the same situation where i need to add two characteristics (invoice date, due date) to the AR drill down reports. I added them to the structure and TKAF table as you did, but still could not get them to the drill down reports (FDI5 or FI1).
From your posts, i see that SAP's response was that it is not possible to add characteristics to AR drilldown reports? Did they mention any reasons or OSS notes? How did you handle your requirement, were you able to work around?
Your suggestions would be highly appreciated.
Thanks
Vamsi -
Additional fields for line item display for Vendor Accounts
Hi,
The additional fields for line item display have been defined for the vendor accounts. I am able to see the additional fields in SAP 4.7 system but not in ECC 6.0.
Could you help me to know how the same will be displayed in ECC 6.0 system.
ThanksIn SPRO, Vendor Accounts -> Line Items -> Display Line Items -> Define Additional fields for Line item display, the fields for Check number from (PAYR-CHECF) and Tax Jurisdiction (BSEG-TXJCD) have been defined.
When I am executing Vendor Line Item display (FBL1N), I am not able to select these fields for defining a layout. Could you please let me know, how I will get these fields in FBL1N.
Thanks
Maybe you are looking for
-
Hi. I used my PC and configured up an new iPhone 5s. I was logged into my own Apple ID while installing it and recovering it from an older Safety Copy, the safety copy was done also while on this account. I want the owner of the 5S to use their own A
-
If this xml would have been in file I could have used following code: <?xml version="1.0" encoding='WINDOWS-1252'?> <?xml-stylesheet type="text/xsl" href="t.xsl" ?> <page xmlns:xsql="urn:oracle-xsql"> <xsql:include-xsql href="order_id_seq.xsql" repar
-
How can i buy apple TV in thailand.
How can i buy apple TV in thailand. Please advise me. Thanks in advance S_onetu
-
Compilers with (good) support for c++11
I'm looking for more compilers to cross check and optimize the project I'm working on. As I tested and tried a lot of new c++11 features, those should be supported. Up to now on my machine I have: g++ (the good one! ) clang++ (does not support openMP
-
Air play button not visibile on Control center
Good morning , I don't understand a thing... Normally.. The Airplay button is visible only when the Apple TV is configured and is in the same network? Now I don't have an Apple TV (I will buy it tomorrow probably) and I don't see the airplay button n