‎2006 Jul 31 11:22 AM
HI
FRIENDS STUCK IN A SMALL PROBLEM IAM DOING A BDC FOR F-04
IN WHICH I HAD FLAT FILE IN THE FOLLOWING FORMAT ,
27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174
7400007175
7400007176
27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007177
7400007178
7400007179
THE DATA IS SPLIT DEPENDING UPON BUSINESS AREA 1000 AND 1001 , BUT IAM NOT ABLE TO GET ALL THE
ACCOUNT NOS STARTING FROM 7400 .. TO NEXT BUSINESS AREA I AM GETTING ONLY THE FIRST ACCT NO.
HERE I THINK AT NEW IS NOT WORKING .
SO PLS CAN ANYBODY TELL ME HOW TO DO THIS .
‎2006 Jul 31 11:34 AM
Hi Farukh,
The Flat File must be in Header( 27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174 )
and Item( 7400007175 ) format for such requirements.
In Header & Item you can have one extra field ( say <b>RELN</b> )to relate between them.
<b>Header</b>
<b>1000</b> 27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174
<b>1001</b> 27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007177<b>Item</b>
<b>1000</b> 7400007175
<b>1000</b> 7400007176
<b>1001</b> 7400007178
<b>1001</b> 7400007179Then in the Program.
loop at it_header .
"Header level BDC data
loop at it_item where <b>RELN = it_header-RELN</b>.
"Will get Item level BDC data based on header
endloop.
endloop.
Regards,
AS
‎2006 Jul 31 11:27 AM
Hello,
Fill one more table with the business area and GL. and do the loop on that whenever you required to pass the data. And read your original file accordinly.
regards,
Naimesh
‎2006 Jul 31 11:29 AM
hi,
you should have data in the format in which you are validating.
this will ease your batch data transfer process.
you could have the records starting with business area as the field.
Also keep in mind that there should be an indicator to distinguish between header and item records
For eg,you could have H to indicate the header and I to indicate the item..
Cheers,
Abdul Hakim
‎2006 Jul 31 11:34 AM
Hi Farukh,
The Flat File must be in Header( 27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174 )
and Item( 7400007175 ) format for such requirements.
In Header & Item you can have one extra field ( say <b>RELN</b> )to relate between them.
<b>Header</b>
<b>1000</b> 27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174
<b>1001</b> 27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007177<b>Item</b>
<b>1000</b> 7400007175
<b>1000</b> 7400007176
<b>1001</b> 7400007178
<b>1001</b> 7400007179Then in the Program.
loop at it_header .
"Header level BDC data
loop at it_item where <b>RELN = it_header-RELN</b>.
"Will get Item level BDC data based on header
endloop.
endloop.
Regards,
AS
‎2006 Jul 31 1:39 PM
hi
thanks for reply .
i did in the same way as u experts gaveme the suggestion
but its only picking up the data of only one business area for ex. working fine for the records of first business area in file and at the second busineess area
the header table gets blank , but it has all the data in begining ? why?.didnt find anything in debugging.
regards .
‎2006 Jul 31 1:54 PM
Hello,
Your itab is like
27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174
7400007175
7400007176
27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007177
7400007178
7400007179
make it is as
X 27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007174
27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007175
27.10.2004 sa npil 31.07.2006 3689525.64 1000 2000 2810200 7400007176
X 27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007177
27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007178
27.10.2004 sa npil 31.07.2006 3689525.64 1001 2000 2810200 7400007179
If first column is 'X' then do processing of the header value.
Regards,
Naimesh
‎2006 Jul 31 2:00 PM
This is the code ,
LOOP AT i_final .
CLEAR i_gsber.
MOVE-CORRESPONDING i_final TO i_gsber.
APPEND i_gsber.
ENDLOOP.
LOOP AT i_gsber.
CLEAR item.
MOVE-CORRESPONDING i_gsber TO item.
IF i_gsber-gsber <> space .
w_gsber = i_gsber-gsber.
ENDIF.
item-gsber = w_gsber.
item-sel01 = i_gsber-sel01.
APPEND item.
ENDLOOP.
*
*********************the include part
PERFORM bdc_dynpro USING 'SAPMF05A' '0731'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
LOOP AT item WHERE gsber = wa_itab-gsber.
MOVE-CORRESPONDING item TO wa_item.
ENDAT.
LOOP AT item WHERE gsber = i_gsber-gsber.
w_count = w_count + 1.
CONCATENATE 'RF05A-SEL01(' w_count ')' INTO w_bdc.
PERFORM bdc_field USING w_bdc
wa_item-sel01.
IF w_count >= 16.
w_count = 0.
PERFORM bdc_dynpro USING 'SAPMF05A' '0731'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
ENDIF.
ENDLOOP.
AT END OF gsber.
PERFORM bdc_dynpro USING 'SAPMF05A' '0731'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=PA'.
PERFORM bdc_dynpro USING 'SAPDF05X' '3100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=AB'.
PERFORM bdc_dynpro USING 'SAPMF05A' '0700'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
regards
‎2006 Jul 31 2:55 PM