Skip to Content
author's profile photo Former Member
Former Member

bdc on f-02

Hi ! All

I am developing bdc on f-02 with profitability seegment data.

i am using one header line item posting key as 40 and other line items with posting key 50 and profitability segment.

i am reading data from text input file where there are multiple records. End of transaction is marked as a flag X. BDC is creating a job. When i run a job in sm35 i am getting an error

No batch input data for screen SAPMF05A 0700

Message no. 00344

i am pasting my code and data file here.

Kindly help me where i am making mistake.

My bdc code

report ZCOPA_SUBS.

include bdcrecx1.

*parameters: dataset(132) lower case.

Types: begin of ty_data,

BLDAT(010) TYPE C,

BUDAT(010) TYPE C,

MONAT(002) TYPE C,

NEWBS LIKE RF05A-NEWBS,

NEWKO LIKE RF05A-NEWKO,

WRBTR(16) TYPE C,

SGTXT LIKE BSEG-SGTXT,

mark_end type c,

REGIO(2) TYPE C,

SALES_GRP(3) TYPE C,

SALES_OFF(2) TYPE C,

BATCH(10) TYPE C,

End of ty_data.

DATA : WA_DATA TYPE TY_DATA,

WA_DATA_READ TYPE TY_DATA.

data : w_count type i value 1,

w_tabix(10) type n.

DATA : F_NAME TYPE STRING.

----


  • INTERNAL TABLES: Begin with IT_ *

----


data : it_data type standard table of ty_data,

it_data_read type standard table of ty_data.

PARAMETERS : f1_name LIKE ibipparms-path.

----


  • AT SELECTION-SCREEN ON *

----


AT SELECTION-SCREEN ON VALUE-REQUEST FOR f1_name.

CALL FUNCTION 'F4_FILENAME'

  • EXPORTING

  • PROGRAM_NAME = SYST-CPROG

  • DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

IMPORTING

file_name = f1_name.

----


  • AT SELECTION-SCREEN *

----


start-of-selection.

MOVE f1_name TO f_name.

perform f001-upload_data.

perform open_group.

loop at it_data into wa_data.

w_tabix = sy-tabix + 1.

if w_count = 1.

perform bdc_dynpro using 'SAPMF05A' '0100'.

perform bdc_field using 'BDC_CURSOR'

'RF05A-NEWKO'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BKPF-BLDAT'

wa_data-BLDAT.

perform bdc_field using 'BKPF-BLART' 'SA'.

"record-BLART_002.

perform bdc_field using 'BKPF-BUKRS' 'RCFL'.

"record-BUKRS_003.

perform bdc_field using 'BKPF-BUDAT'

wa_data-BUDAT.

perform bdc_field using 'BKPF-MONAT'

wa_data-MONAT.

perform bdc_field using 'BKPF-WAERS' 'INR'.

"record-WAERS_006.

perform bdc_field using 'FS006-DOCID' '*'.

"record-DOCID_007.

perform bdc_field using 'RF05A-NEWBS' '40'.

"record-NEWBS_008.

perform bdc_field using 'RF05A-NEWKO' '130000'.

"record-NEWKO_009.

perform bdc_dynpro using 'SAPMF05A' '0300'.

perform bdc_field using 'BDC_CURSOR'

'BSEG-WRBTR'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BSEG-WRBTR'

wa_data-WRBTR.

perform bdc_dynpro using 'SAPLKACB' '0002'.

perform bdc_field using 'BDC_CURSOR'

'COBL-PRCTR'.

perform bdc_field using 'BDC_OKCODE'

'=ENTE'.

perform bdc_field using 'COBL-GSBER' '4'.

"record-GSBER_011.

perform bdc_field using 'COBL-PRCTR' '412'.

"record-PRCTR_012.

Endif.

clear wa_data_read.

read table it_data_read index w_tabix

into wa_data_read.

if wa_data-mark_end <> 'X'.

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'

wa_data-WRBTR.

perform bdc_field using 'BSEG-SGTXT'

wa_data-SGTXT.

perform bdc_field using 'RF05A-NEWBS' '50'.

"record-NEWBS_015.

perform bdc_field using 'RF05A-NEWKO' '502504'.

"record-NEWKO_016.

perform bdc_field using 'DKACB-FMORE' 'X'.

"record-FMORE_017.

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' '4'.

"record-GSBER_018.

perform bdc_field using 'COBL-PRCTR' '412'.

"record-PRCTR_019.

perform bdc_dynpro using 'SAPMF05A' '0300'.

perform bdc_field using 'BDC_CURSOR'

'BSEG-SGTXT'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BSEG-WRBTR'

wa_data-WRBTR.

perform bdc_field using 'BSEG-SGTXT'

wa_data-SGTXT.

perform bdc_field using 'DKACB-FMORE' 'X'.

"record-FMORE_022.

perform bdc_dynpro using 'SAPLKACB' '0002'.

perform bdc_field using 'BDC_CURSOR'

'COBL-PRCTR'.

perform bdc_field using 'BDC_OKCODE'

'=COBL_XERGO'.

perform bdc_field using 'COBL-GSBER' '4'.

"record-GSBER_023.

perform bdc_field using 'COBL-PRCTR' '412'.

"record-PRCTR_024.

perform bdc_dynpro using 'SAPLKEAK' '0300'.

perform bdc_field using 'BDC_CURSOR'

'RKEAK-FIELD(10)'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_field using 'RKEAK-FIELD(02)' '1'.

" record-FIELD_02_025.

perform bdc_field using 'RKEAK-FIELD(08)' 'FERT'.

" record-FIELD_08_026.

perform bdc_field using 'RKEAK-FIELD(10)' 'TR'.

" record-FIELD_10_027.

perform bdc_dynpro using 'SAPLKEAK' '0300'.

perform bdc_field using 'BDC_CURSOR'

'RKEAK-FIELD(15)'.

perform bdc_field using 'BDC_OKCODE'

'=WEIT'.

perform bdc_field using 'RKEAK-FIELD(02)'

wa_data-sales_grp.

perform bdc_field using 'RKEAK-FIELD(04)' 'IN'.

perform bdc_field using 'RKEAK-FIELD(07)'

wa_data-sales_off.

perform bdc_field using 'RKEAK-FIELD(14)'

wa_data-batch.

perform bdc_field using 'RKEAK-FIELD(15)'

wa_data-regio.

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' '4'.

perform bdc_field using 'COBL-PRCTR' '412'.

else.

perform bdc_dynpro using 'SAPMF05A' '0300'.

perform bdc_field using 'BDC_CURSOR'

'BSEG-WRBTR'.

perform bdc_field using 'BDC_OKCODE'

'=BS'.

perform bdc_field using 'BSEG-WRBTR'

wa_data-WRBTR.

perform bdc_field using 'BSEG-SGTXT'

wa_data-SGTXT.

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' '4'.

perform bdc_field using 'COBL-PRCTR' '412'.

*If wa_data-newko <> '130000'.

perform bdc_dynpro using 'SAPLKEAK' '0300'.

perform bdc_field using 'BDC_CURSOR'

'RKEAK-FIELD(10)'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_field using 'RKEAK-FIELD(02)' '1'.

" record-FIELD_02_025.

perform bdc_field using 'RKEAK-FIELD(08)' 'FERT'.

" record-FIELD_08_026.

perform bdc_field using 'RKEAK-FIELD(10)' 'TR'.

" record-FIELD_10_027.

perform bdc_dynpro using 'SAPLKEAK' '0300'.

perform bdc_field using 'BDC_CURSOR'

'RKEAK-FIELD(15)'.

perform bdc_field using 'BDC_OKCODE'

'=WEIT'.

perform bdc_field using 'RKEAK-FIELD(02)'

wa_data-sales_grp.

perform bdc_field using 'RKEAK-FIELD(04)' 'IN'.

perform bdc_field using 'RKEAK-FIELD(07)'

wa_data-sales_off.

perform bdc_field using 'RKEAK-FIELD(14)'

wa_data-batch.

perform bdc_field using 'RKEAK-FIELD(15)'

wa_data-regio.

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' '4'.

perform bdc_field using 'COBL-PRCTR' '412'.

*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'.

*endif.

*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'.

clear w_count.

clear bdcdata.

refresh bdcdata.

ENDIF.

clear wa_data.

w_count = w_count + 1.

endloop.

perform close_group.

&----


*& Form f001-upload_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM f001-upload_data .

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = f_name

filetype = 'ASC'

has_field_separator = 'X'

TABLES

data_tab = it_data.

loop at it_data into wa_data.

append wa_data TO it_data_read.

endloop.

ENDFORM.

Data File

22.08.2008 22.08.2008 5 40 130000 15000.00 Subsidy aug 08 10 K22 60 AQUITANIA

22.08.2008 22.08.2008 5 50 502504 10000.00 Subsidy aug 08 10 K22 60 AQUITANIA

22.08.2008 22.08.2008 5 50 502504 2000.00 Subsidy aug 08 10 K22 60 AQUITANIA

22.08.2008 22.08.2008 5 50 502504 3000.00 Subsidy aug 08 X 10 K22 60 AQUITANIA

Regards

Sanjay Petkar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Sep 17, 2008 at 09:22 AM
    No batch input data for screen SAPMF05A 0700

    Because of you are tring to input the data in screen 0700 where you did't enter data while your recording.

    Check and match your program with SHD0 recoding from display view

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2008 at 12:18 PM

    hiii,

    Compare ur coding with the recording in SHDB. You might have missed some input data for Screen 700.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2016 at 06:45 AM

    Hi ,

    Goto T.Code FB00-->Under Document entry Tab , select the "Calculate Taxes on net amount" option--> Save..

    Then if your run the program u will not get any "No batch input data for screen SAPMF05A 0700".

    Thanks


    FB00.png (14.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2016 at 07:03 AM

    Hi Sanjay,

    There are two possibilities, the one is whether the tax is adjusted or still it need to adjust for exaple with holding tax or other,

    other wise please check whether the credit and debit sum should be zero.

    Thanks & regards,

    Jaydeep

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.