2009 Jun 19 6:04 AM
Hi,
We have a requirement for developing a new BDC for FB01. we are getting coding blocks while recording the transaction FB01 which is not happened in general posting document using FB01. When I refer the forums, we came to know there is standard program RFBIBL00 in SAP for FB01 tcode. But we are not sure on how to use this program for our requirement.
Can anyone send us the sample excel sheet which wil be useful for executing this program and also let us know how to use this program for our requirement.
Thanks in advance for your great help.
Ramesh.
2009 Jun 19 6:08 AM
Hello Ramesh,
RFBIBL00 is a Data Transfer Program mostly used in LSMW.
Please refer the Program Documentation, which will give you a better idea.
You have to call the program in below manner.. where BILLING is the variant used..
submit rfbibl00 VIA SELECTION-SCREEN
USING SELECTION-SET 'BILLING'
AND RETURN.
2009 Jun 19 6:08 AM
Hello Ramesh,
RFBIBL00 is a Data Transfer Program mostly used in LSMW.
Please refer the Program Documentation, which will give you a better idea.
2009 Jun 19 6:13 AM
Hi,
Thanks for your prompt response.
I want to have one sample data to execute this program. If anyone is having the sample data, please send.
Ramesh.
2009 Jun 19 6:16 AM
You just need to Fill the mandatory fields. Sample data may not work in your system
2009 Jun 19 6:16 AM
You have to call the program in below manner.. where BILLING is the variant used..
submit rfbibl00 VIA SELECTION-SCREEN
USING SELECTION-SET 'BILLING'
AND RETURN.
2009 Jun 19 6:55 AM
Hi,
Thanks, I tried to do the same, but not getting the things in this case. Kindly let us know how to proceed.
Ramesh.
2009 Jun 19 8:57 AM
Ramesh...I think this will give you a basic idea..
We had used this program for transaction FB05....Clear open items..
Firstly...you need to fetch the data that you need to upload into an internal table...
Define an internal table which has the following type..
Please refer below codes...
DATA: BEGIN OF ty_OUT OCCURS 1000,
STRING(250) TYPE C,
END OF ty_OUT.
FORM ANALYZE_and_convert.
perform fill_session_header. "BGR00
LOOP AT Payment_data.
Perform fill_header. "BBKPF
perform fill_item. "ZBSEG
perform fill_clearing_header. "BSELK
perform fill_clearing_line_item. "BSELP
ENDLOOP.
ENDFORM. " ANALYZE_and_convert
FORM fill_header.
MOVE: '1' TO BBKPF-STYPE,
'FB05' TO BBKPF-TCODE,
'EINGZAHL' TO BBKPF-auglv. "Incomming Payment
write: p_bldat TO BBKPF-BLDAT,
p_budat TO BBKPF-BUDAT.
move: 'DZ' TO BBKPF-BLART,
'A' TO BBKPF-BUKRS,
p_monat tO BBKPF-MONAT,
'GBP' TO BBKPF-WAERS,
'Test-Payment data transfer' to BBKPF-BKTXT,
Payment_data-payment_id tO BBKPF-XBLNR,
'X' TO BBKPF-XMWST.
move: '/' TO BBKPF-wwert,
'/' TO BBKPF-kursf,
'/' TO BBKPF-bvorg,
'/' TO BBKPF-pargb,
'/' TO BBKPF-vbund,
'/' TO BBKPF-docid,
'/' TO BBKPF-barcd,
'/' TO BBKPF-Stodt,
'/' TO BBKPF-brnch,
'/' TO BBKPF-numpg,
'/' TO BBKPF-Stgrd,
'/' TO BBKPF-kursf_m,
'/' TO BBKPF-SENDE.
APPEND BBKPF TO WA_OUT.
* PERForm get_customer USING Payment_DATA-BUSINESS_id.
* perform get_payment_method using Payment_data-payment_method.
ENDFORM. " fill_header
2009 Jun 19 8:58 AM
Continued...
FORM fill_item.
MOVE : '2' TO ZBSEG-STYPE,
'ZBSEG' TO ZBSEG-TBNAM,
'40' to ZBSEG-newbs, "posting key for next line
'/' to ZBSEG-NEWBK,
'9995' to ZBSEG-newko.
ZBSEG-WRBTR = Payment_data-AMOUNT.
move : '/' TO ZBSEG-WMWST,
'/' TO ZBSEG-MWSKZ,
* 'A1' TO ZBSEG-MWSKZ,
'00' TO ZBSEG-GSBER,
'/' TO ZBSEG-KOSTL,
'Test Clearing Text' to zbseg-sgtxt,
'/' to ZBSEG-zterm,
'/' to ZBSEG-zlsch,
'/' TO ZBSEG-NEWBW,
'YP_DUMMY' to ZBSEG-prctr,
'/' TO ZBSEG-SENDE.
APPEND ZBSEG TO Wa_OUT.
ENDFORM. " fill_item
FORM fill_clearing_header.
move : '2' to bselk-stype,
'BSELK' TO bselk-TBNAM,
* ws_kunnr to bselk-agkon,
Payment_DATA-BUSINESS_id to bselk-agkon,
'A' TO bselk-AGBUK,
'D' TO bselk-AGKOA,
'X' TO bselk-XNOPS,
'/' TO bselk-AGUMS,
'/' TO bselk-AVSID,
'X' TO bselk-XFIFO,
'/' TO bselk-SENDE.
APPEND BSELK TO WA_OUT.
ENDFORM. " fill_clearing_header
2009 Jun 19 8:59 AM
Continued...
FORM fill_clearing_line_item.
move : '2' to BSELP-stype,
'BSELP' TO BSELP-TBNAM,
'XBLNR' to BSELP-FELDN_1,
Payment_data-invoice_no TO BSELP-SLVON_1.
APPEND BSELP TO WA_OUT.
ENDFORM. " fill_clearing_line_item
* Now write the data into the output file in the location...from where the program rfbibl00 can access
FORM WRITE_output_file.
OPEN DATASET OUT_FILE FOR OUTPUT IN TEXT MODE.
IF SY-SUBRC GT 0.
WRITE:/ 'Error opening file OUT_FILE'.
ENDIF.
LOOP AT WA_OUT.
TRANSFER WA_OUT TO OUT_FILE.
ENDLOOP.
CLOSE DATASET OUT_FILE.
IF SY-SUBRC GT 0.
WRITE:/ 'Error closing file OUT_FILE'.
ENDIF.
ENDFORM. " WRITE_output_file
Now...call the program rfbibl00 for the uplaod process..
submit rfbibl00 VIA SELECTION-SCREEN
USING SELECTION-SET 'PAYMENTS'
AND RETURN.
The variant 'PAYMENTS' should specify the following things..
The file path name where you have written the file...
Data Transfer Type....whether its 'D'
and Number of docs per commit '1000'.
2009 Jun 19 10:03 AM
Hi Vin,
Thanks a lot for your code.
We still getting the coding blocks in our program while using the standard one. We are not sure why this coding block screen( no screen fields to enter) is appearing while executing our program in foreground. If we run it in background, transaction is getting failed because of this.
Kindly advice...
Ramesh,
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |