‎2009 Jul 13 11:58 AM
I require to develop a bdc for T. CODE vk11. while running the bdc in foreground mode an error message is coming
"Screen 0000 is too large for internal batch input area".
can anyone help me out on this.
‎2009 Jul 13 12:08 PM
Hi,
Please check in the program..do you have a screen 0000 specified in the code while creating BDC data...if there is thats the issue.
Regads,
Himanshu v
‎2009 Jul 13 12:13 PM
‎2009 Jul 13 12:12 PM
Dear Kushal,
Something wrong with you recording of VK11 in SHDB.
You might have missed some screen or in your code you might have written a wrong SCREEN number.
Please check your recording and the code.
And best is to got for a new recording for VK11 and then compare the two.
Regds,
Anil
‎2009 Jul 13 12:17 PM
Hi,
Check your flat file . The problem Lies in your flat file. The value of the field in flat file must be larger than SAP defined field length. It has to be due to the mismatch between source field and target field.
With regards,
M.Sreeram
‎2009 Jul 13 12:23 PM
I have checked. There is no such value which SAP cannot hold.
‎2009 Jul 13 12:37 PM
Hi Kushal,
Just run through your BDC program and see if you have the appropriate Screen names and numbers assigned for each of the screens. probably to do this you could process vk11 txn and on each screen change note down the program name and dynpro number.
Then in your BDC check for perform bdc_dynpro and see if all the screens are being called and in appropriate error.
If you dont spot any error here then pls revert.
‎2009 Jul 13 12:46 PM
I have checked screen no and prg name for each screen change but found no error.
‎2009 Jul 13 12:47 PM
Hi,
Is it possible for you to paste your code?
We can have a look.
Regards,
Ankur Parab
‎2009 Jul 13 1:02 PM
REPORT z_vk11_zprc
NO STANDARD PAGE HEADING LINE-SIZE 255.
PARAMETERS: p_file LIKE rlgrap-filename.
PARAMETERS: m_mode(1) DEFAULT 'P'.
PARAMETERS : p_item TYPE i DEFAULT 18.
DATA: BEGIN OF irec OCCURS 0,
zzlocn LIKE komg-zzlocn,
zzpcode LIKE komg-zzpcode,
zzbqcode LIKE komg-zzbqcode,
kunnr LIKE komg-kunnr, "Customer No
kbetr LIKE konp-kbetr, "Value
konwa LIKE konp-konwa, "Rate unit (INR)
kpein LIKE konp-kpein, "Condition pricing unit (1)
kmein like KONP-KMEIN, "Condition unit (tO)
konp LIKE konp-kmein,
datab LIKE rv13a-datab, "FROM DATE
datbi LIKE rv13a-datbi, "TO DATE
zterm LIKE konp-zterm, "TERM
END OF irec.
DATA : irec_item LIKE irec OCCURS 0 WITH HEADER LINE ,
it_bdc TYPE TABLE OF bdcdata WITH HEADER LINE .
DATA : bdcmsgcoll LIKE bdcmsgcoll OCCURS 0 .
DATA: m_irec_item TYPE i.
DATA : w_pbset(30) VALUE 'DF05B-PSBET',
w_kunnr(30) VALUE 'KOMG-KUNNR',
w_kbetr(30) VALUE 'KONP-KBETR',
w_konwa(30) VALUE 'KONP-KONWA',
w_kpein(30) VALUE 'KONP-KPEIN',
w_kmein(30) VALUE 'KONP-KMEIN',
w_datab(30) VALUE 'RV13A-DATAB',
w_datbi(30) VALUE 'RV13A-DATBI',
w_zterm(30) VALUE 'KONP-ZTERM',
w_counter(2) TYPE n VALUE '00'.
at selection-screen on value-request for p_file.
perform open_window.
*include bdcrecx1.
START-OF-SELECTION.
PERFORM fill_itab.
end-OF-SELECTION.
sort irec by zzlocn zzpcode zzbqcode.
loop at irec.
move-corresponding irec to irec_item.
append irec_item.
endloop.
delete adjacent duplicates from irec comparing zzlocn zzpcode zzbqcode.
*perform open_group.
perform fill_bdc.
form fill_bdc.
LOOP AT irec.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ANTA'.
PERFORM bdc_field USING 'RV13A-KSCHL'
'ZPRC'.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(07)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(01)'
''.
PERFORM bdc_field USING 'RV130-SELKZ(07)'
'X'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMG-ZZLOCN'
IREC-ZZLOCN."'040'.
PERFORM bdc_field USING 'KOMG-ZZPCODE'
IREC-ZZPCODE."'C02'.
PERFORM bdc_field USING 'KOMG-ZZBQCODE'
IREC-ZZBQCODE."'TATXGP'.
CLEAR w_counter.
LOOP AT irec_item WHERE zzlocn = irec-zzlocn AND zzpcode = irec-zzpcode
AND zzbqcode = irec-zzbqcode.
w_counter = w_counter + 01.
w_kunnr = 'KOMG-KUNNR'.
w_kbetr = 'KONP-KBETR'.
w_konwa = 'KONP-KONWA'.
w_kmein = 'KONP-KMEIN'.
w_kpein = 'KONP-KPEIN'.
w_kmein = 'KONP-KMEIN'.
w_datab = 'RV13A-DATAB'.
w_datbi = 'RV13A-DATBI'.
w_zterm = 'KONP-ZTERM'.
CONCATENATE w_kunnr '(' w_counter ')' INTO w_kunnr.
CONCATENATE w_kbetr '(' w_counter ')' INTO w_kbetr.
CONCATENATE w_konwa '(' w_counter ')' INTO w_konwa.
CONCATENATE w_kpein '(' w_counter ')' INTO w_kpein.
CONCATENATE w_kmein '(' w_counter ')' INTO w_kmein.
CONCATENATE w_datab '(' w_counter ')' INTO w_datab.
CONCATENATE w_datbi '(' w_counter ')' INTO w_datbi.
CONCATENATE w_zterm '(' w_counter ')' INTO w_zterm.
PERFORM bdc_field USING w_kunnr "'KOMG-KUNNR(01)'
irec_item-kunnr.
PERFORM bdc_field USING w_kbetr "'KONP-KBETR(01)'
irec_item-kbetr.
PERFORM bdc_field USING w_konwa "'KONP-KONWA(01)'
irec_item-konwa.
PERFORM bdc_field USING w_kpein "'KONP-KPEIN(01)'
irec_item-kpein.
PERFORM bdc_field USING w_kmein "'KONP-KMEIN(01)'
irec_item-kmein.
PERFORM bdc_field USING w_datab "'RV13A-DATAB(01)'
irec_item-datab.
PERFORM bdc_field USING w_datbi "'RV13A-DATBI(01)'
irec_item-datbi.
PERFORM bdc_field USING w_zterm "'KONP-ZTERM(01)'
irec_item-zterm.
if w_counter eq p_item . "no of visible line items in user screen.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=NEWP'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
w_counter = 2.
endif.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
call TRANSACTION 'VK11' USING it_bdc update 'S' mode m_mode MESSAGES INTO bdcmsgcoll.
ENDLOOP.
ENDFORM.
&----
*& Form bdc_dynpro
&----
text
----
-->PROGRAM text
-->DYNPRO text
----
FORM bdc_dynpro USING program dynpro.
CLEAR it_bdc.
it_bdc-program = program.
it_bdc-dynpro = dynpro.
it_bdc-dynbegin = 'X'.
APPEND it_bdc.
ENDFORM. "bdc_dynpro
&----
*& Form bdc_field
&----
text
----
-->FNAM text
-->FVAL text
----
FORM bdc_field USING fnam fval.
if fval <> nodata.
CLEAR it_bdc.
it_bdc-fnam = fnam.
it_bdc-fval = fval.
APPEND it_bdc.
endif.
ENDFORM. "bdc_field
&----
*& Form OPEN_WINDOW
&----
text
----
--> p1 text
<-- p2 text
----
form OPEN_WINDOW .
call function 'KD_GET_FILENAME_ON_F4'
exporting
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
field_name = 'P_FILE'
STATIC = ' '
MASK = ' '
changing
file_name = p_file
EXCEPTIONS
MASK_TOO_LONG = 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.
endform. " OPEN_WINDOW
&----
*& Form FILL_ITAB
&----
text
----
--> p1 text
<-- p2 text
----
form FILL_ITAB .
data: l_file type string.
l_file = p_file.
call function 'GUI_UPLOAD'
exporting
filename = l_file
filetype = 'ASC'
has_field_separator = '|'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = irec[]
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. " FILL_ITAB
‎2009 Jul 13 1:33 PM
There are lot of problems in your code within loop.
You have taken a counter to check line items, but no where you are incrementing it.
Also PERFORM statements are writtne wrongly against SCREEN.
It is showing on (01).
Here is the sample code within the loop.
First Declare two vaialbes for SCREEN FIELDS AND COUNTER.
DATA: M_COUNT(3), FLDNAME(25).
Now Do within the loop as follows:
LOOP AT RECORD.
M_COUNT = M_COUNT + 1.
IF M_COUNT > LINENO.
PERFORM BDC_DYNPRO USING 'SAPMV13A' '1802'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'KOMG-MATNR(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=P+'.
M_COUNT = 2.
ENDIF.
CONDENSE M_COUNT.
CLEAR FLDNAME.
CONCATENATE 'KOMG-MATNR(' M_COUNT ')' INTO FLDNAME.
PERFORM BDC_FIELD USING FLDNAME RECORD-MATNR.
CLEAR FLDNAME.
CONCATENATE 'KONP-KBETR(' M_COUNT ')' INTO FLDNAME.
PERFORM BDC_FIELD USING FLDNAME RECORD-KBETR.
ENDLOOP.
This is just a sample and not the actual code.
So just try your luck.
Regds,
Anil
‎2009 Jul 13 12:17 PM
by seeing this note number 646505
you might get some idea why the error had occured.
‎2009 Jul 13 1:14 PM
Hi,
Please see if this FM is useful.
RH_CONDITION_DELETE
RV_CONDITION_DELETE_BY_FIELD
Regards,
Nagaraj