2012 Jun 27 8:38 AM
Hi Good Day,
When i am trying to post recurring entry document in background processing,
The error that i get is : NO batch input data for screen SAPLKACB 0002.
But if i run same document in foreground it gets posted.
No Tax involved in recurring document.Simply Credit to vendor and debit to GL account.
we have implemented SAP note no 1427950.
NO mandatory information for screen SAPLKACB 0002 in the BDC session.
I Have tried with MODE = 'E'. Gives BELOW screen where the issue is, but the screen looks ok with master data in it. ANY inputs will be highly appriciated.
my BDC :
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'
l_BLDAT."'25.05.2012'.
perform bdc_field using 'BKPF-BLART'
P_BLART."'vq'.
perform bdc_field using 'BKPF-BUKRS'
P_BUKRS. ""'TR01'.
perform bdc_field using 'BKPF-BUDAT'
l_BUDAT."'25.05.2012'.
perform bdc_field using 'BKPF-MONAT'
P_MONAT. "'3'.
perform bdc_field using 'BKPF-WAERS'
P_WAERS."'ZAR'.
perform bdc_field using 'BKPF-XBLNR'
'ZPRV1'."'SECURE'.
perform bdc_field using 'BKPF-BKTXT'
'Security provision'.
perform bdc_field using 'BKPF-STGRD'
P_STGRD. "'2'.
perform bdc_field using 'BKPF-STODT'
L_STODT."'26.05.2012'.
perform bdc_field using 'FS006-DOCID'
'*'.
clear : I_AMOUNT_OLD, cnt.
CLEAR : REF_NUM, total.
LOOP AT IT_PRV1 ASSIGNING <WA_PRV1>.
IF SY-TABIX = 1.
cnt = 1.
MOVE <WA_PRV1>-ZREF_NUM TO REF_NUM.
ENDIF.
move <WA_PRV1>-ZPROVISION to I_AMOUNT_OLD.
CONDENSE I_AMOUNT_OLD.
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'vv'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'COBL-GSBER'
'BATX'."''." <WA_PRV1>-ZBUS_AREA."
SHIFT <WA_PRV1>-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
'716001'."<WA_PRV1>-ZCOST_CENTRE. "
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
'92902'."<WA_PRV1>-ZACCOUNT. "
perform bdc_field using 'COBL-FIPOS'
'92902'. "<WA_PRV1>-ZACCOUNT. "
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'VV'.
ENDLOOP.
SELECT SINGLE * from zglprov where ZREF_NUM = REF_NUM.
cnt = cnt + cnt.
perform bdc_field using 'RF05A-NEWBS'
zglprov-ZDEBI_CREDIT. "'50'."
SHIFT zglprov-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
zglprov-ZACCOUNT. "'49001'. "
perform bdc_field using 'DKACB-FMORE'
'X'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'COBL-GSBER'
zglprov-ZBUS_AREA."'BATX'. "
SHIFT zglprov-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
'716002'. "zglprov-ZCOST_CENTRE."zglprov-ZCOST_CENTRE."
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
<WA_PRV1>-ZACCOUNT."'92902'."<WA_PRV1>-ZACCOUNT."
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPOS'
<WA_PRV1>-ZACCOUNT. "'92902'. "
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR'
'BSEG-WRBTR'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BSEG-WRBTR'
'*'.
perform bdc_field using 'BSEG-MWSKZ'
zglprov-ZTAX."'VV'."
perform bdc_field using 'BSEG-VALUT'
'18.06.2012'.
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'
zglprov-ZBUS_AREA."'BATX'.
SHIFT zglprov-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
zglprov-ZACCOUNT. "'49001'.
SHIFT zglprov-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPOS'
zglprov-ZACCOUNT. "'49001'.
CALL TRANSACTION 'FBS1'"va_tcode
USING bdcdata
MODE 'N'"VA_MODE
UPDATE va_update
MESSAGES INTO it_messtab.
2012 Jun 29 12:37 PM
as i said...i have sorted it out:
the solution is :
when i loop the items, i dont append the SCREEN 0002 and when i come for the next time i append and it works and this how the code looks now.
DATA: FIRST TYPE C VALUE 'Y'.
clear : I_AMOUNT_OLD, cnt.
CLEAR : REF_NUM, total.
LOOP AT IT_PRV1 ASSIGNING <WA_PRV1>.
IF SY-TABIX = 1.
cnt = 1.
MOVE <WA_PRV1>-ZREF_NUM TO REF_NUM.
ENDIF.
move <WA_PRV1>-ZPROVISION to I_AMOUNT_OLD.
CONDENSE I_AMOUNT_OLD.
*----old code
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
*--->end of header screen
IF FIRST = 'N'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
* perform bdc_field using 'BDC_OKCODE'
* '=ENTE'.
perform bdc_field using 'COBL-GSBER'
'BATX'."''." <WA_PRV1>-ZBUS_AREA."
SHIFT <WA_PRV1>-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
<WA_PRV1>-ZCOST_CENTRE. "'716001'."
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
'92902'."<WA_PRV1>-ZACCOUNT. "
perform bdc_field using 'COBL-FIPOS'
'92902'. "<WA_PRV1>-ZACCOUNT. "
ENDIF.
*--->second screen
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'vv'.
perform bdc_field using 'DKACB-FMORE'
'X'.
*--->end of second screen
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
* perform bdc_field using 'BDC_OKCODE'
* '=ENTE'.
perform bdc_field using 'COBL-GSBER'
'BATX'."''." <WA_PRV1>-ZBUS_AREA."
SHIFT <WA_PRV1>-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
<WA_PRV1>-ZCOST_CENTRE. "'716001'."
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
'92902'."<WA_PRV1>-ZACCOUNT. "
perform bdc_field using 'COBL-FIPOS'
'92902'. "<WA_PRV1>-ZACCOUNT. "
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'VV'.
gt_itab1-ZREF_NUM = <WA_PRV1>-ZREF_NUM.
gt_itab1-ZTNAME = <WA_PRV1>-ZTNAME.
gt_itab1-ZCONTRACTNR = <WA_PRV1>-ZCONTRACTNR.
gt_itab1-ZVENDOR = <WA_PRV1>-ZVENDOR.
gt_itab1-ZPURCHASE_ORD = <WA_PRV1>-ZPURCHASE_ORD.
gt_itab1-ZCONTRACT_AMOUNT = <WA_PRV1>-ZCONTRACT_AMOUNT.
gt_itab1-ZSTART_DATE = <WA_PRV1>-ZSTART_DATE.
gt_itab1-ZEND_DATE = <WA_PRV1>-ZEND_DATE.
gt_itab1-ZPROVISION = <WA_PRV1>-ZPROVISION.
gt_itab1-ZACCOUNT = <WA_PRV1>-ZACCOUNT.
gt_itab1-ZBUS_AREA = <WA_PRV1>-ZBUS_AREA.
gt_itab1-ZCOST_CENTRE = <WA_PRV1>-ZCOST_CENTRE.
gt_itab1-ZTAX = <WA_PRV1>-ZTAX.
gt_itab1-ZDEBI_CREDIT = <WA_PRV1>-ZDEBI_CREDIT.
append gt_itab1 to gt_itab.
clear : gt_itab1.
SAKNR = <WA_PRV1>-ZACCOUNT.
FIRST = 'N'.
PERFORM simulation_data.
ENDLOOP.
2012 Jun 27 8:51 AM
Hi there,
Most probably this screen pops up somewhere in the document processing and you are not handling it.
Run the batch input in all screen mode and execute it while reading the sequence in the code that you have written. You will probably see that a coding block comes up that you are not handling.
I believe that your problem is within the loop. After passing the coding block , by entering a new posting key and pressing enter, most probably the coding block will come again.
Regards.
2012 Jun 27 9:53 AM
Hi, The screen fields of a perticular G/L account are controlled by the FIELD STATUS GROUP maintained in the G/L master data.
A perticular field can controlled as suppressed or mandatory or optional by using the FIELD STATUS GROUP.
You might have done the recording based a perticular G/L account which is using the field status group, say for ex: 0001.
while testing the BDC, you might be using a G/L account which has FSG maintained other than 0001 because of which some screen elements, which were actually recorded in your BDC, are missing.
You need to check this issue with your functional consultant to enable those fields to avoide these kind of issues.
Hope this helps.
2012 Jun 27 11:38 AM
2012 Jun 27 1:55 PM
Unfortunately not...still could not find what the problem is...can you please help out with more info.
2012 Jun 27 1:59 PM
Try adding the following just before the endloop statement:
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'VV'.
* --- add this
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
* --- add this
ENDLOOP.
2012 Jun 28 11:19 AM
2012 Jun 28 11:44 AM
Change the sequence in the beginning of the loop .
Your code :
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWKO'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
NEW Code
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWKO'.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
And try again.
Regards.
2012 Jun 28 12:12 PM
thank you but this strucks at first screen
here is the loop logic
LOOP AT IT_PRV1 ASSIGNING <WA_PRV1>.
IF SY-TABIX = 1.
cnt = 1.
MOVE <WA_PRV1>-ZREF_NUM TO REF_NUM.
ENDIF.
move <WA_PRV1>-ZPROVISION to I_AMOUNT_OLD.
CONDENSE I_AMOUNT_OLD.
*----old code
* REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
*
* perform bdc_field using 'RF05A-NEWBS'
* <WA_PRV1>-ZDEBI_CREDIT. "'40'.
*
* SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
* perform bdc_field using 'RF05A-NEWKO'
* <WA_PRV1>-ZACCOUNT. "'92902'.
* perform bdc_dynpro using 'SAPMF05A' '0300'.
* perform bdc_field using 'BDC_CURSOR'
* 'RF05A-NEWKO'.
* perform bdc_field using 'BDC_OKCODE'
* '/00'.
*end of old code
*--->begin of new code
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWKO'.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
*--->end of new code
----->tried taking out this part as well but didnt work.
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR'
'RF05A-NEWKO'.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
--->up to here
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BSEG-WRBTR'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'vv'.
* perform bdc_field using 'DKACB-FMORE'
* 'X'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'COBL-GSBER'
'BATX'."''." <WA_PRV1>-ZBUS_AREA."
SHIFT <WA_PRV1>-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
'716001'."<WA_PRV1>-ZCOST_CENTRE. "
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
'92902'."<WA_PRV1>-ZACCOUNT. "
perform bdc_field using 'COBL-FIPOS'
'92902'. "<WA_PRV1>-ZACCOUNT. "
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'VV'.
* --- add this
** perform bdc_dynpro using 'SAPLKACB' '0002'.
** perform bdc_field using 'BDC_OKCODE'
** '=ENTE'.
* --- add this
gt_itab1-ZREF_NUM = <WA_PRV1>-ZREF_NUM.
gt_itab1-ZTNAME = <WA_PRV1>-ZTNAME.
gt_itab1-ZCONTRACTNR = <WA_PRV1>-ZCONTRACTNR.
gt_itab1-ZVENDOR = <WA_PRV1>-ZVENDOR.
gt_itab1-ZPURCHASE_ORD = <WA_PRV1>-ZPURCHASE_ORD.
gt_itab1-ZCONTRACT_AMOUNT = <WA_PRV1>-ZCONTRACT_AMOUNT.
gt_itab1-ZSTART_DATE = <WA_PRV1>-ZSTART_DATE.
gt_itab1-ZEND_DATE = <WA_PRV1>-ZEND_DATE.
gt_itab1-ZPROVISION = <WA_PRV1>-ZPROVISION.
gt_itab1-ZACCOUNT = <WA_PRV1>-ZACCOUNT.
gt_itab1-ZBUS_AREA = <WA_PRV1>-ZBUS_AREA.
gt_itab1-ZCOST_CENTRE = <WA_PRV1>-ZCOST_CENTRE.
gt_itab1-ZTAX = <WA_PRV1>-ZTAX.
gt_itab1-ZDEBI_CREDIT = <WA_PRV1>-ZDEBI_CREDIT.
append gt_itab1 to gt_itab.
clear : gt_itab1.
SAKNR = <WA_PRV1>-ZACCOUNT.
PERFORM simulation_data.
ENDLOOP.
2012 Jun 28 12:49 PM
Hi again,
May I give you an advice ? In general, it's very difficult to investigate this kind of errors when the code is not clearly written. Please, first of all , try to clean up the code and put the statements in a clear order :
* --- First Screen - Header ---*
Perform bdc_dynpro using 'SAPMF05A' '0300'.
perform bdc_field using 'BDC_CURSOR' 'RF05A-NEWKO'.
Perform bdc_field using 'BSEG-WRBTR' I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ' <WA_PRV1>-ZTAX."'VV'.
perform bdc_field using 'BDC_OKCODE' '/00'.
First statement always declaring the new screen, end statement always is the OK code for the screen and between are all the fields that the batch input fills.
If you do so, I believe that it will be more easy for you to pin point the error and if this is not the case, it will be for sure more easy for us to help you.
Regarding your problem, once again you have somewhere missed the coding block. But it's not easy to find exactly where you must add this.
Regards.
2012 Jun 28 1:07 PM
thank you for your effort... i will make sure that i post the documents.
much appreciated for your comments.
2012 Jun 29 8:29 AM
2012 Jun 29 12:38 PM
hi Laurent,
i have sorted and pasted the code of the solution...much appriciated for your comments.
2012 Jun 28 12:29 PM
When you will be tired to build yourself the batch-input data (), you should look at those three FMs
- POSTING_INTERFACE_START
- POSTING_INTERFACE_END
Those FM will build the BDC determining the screen sequence from the Customizing, you only have to fill a BDCDATA like internal table with records for header fields and items fields with all your available data.
You shouldn't need much time to convert your program. Using BAPI is another option, much up-to-date, but more change to your code will be required.
Regards,
Raymond
2012 Jun 29 12:37 PM
as i said...i have sorted it out:
the solution is :
when i loop the items, i dont append the SCREEN 0002 and when i come for the next time i append and it works and this how the code looks now.
DATA: FIRST TYPE C VALUE 'Y'.
clear : I_AMOUNT_OLD, cnt.
CLEAR : REF_NUM, total.
LOOP AT IT_PRV1 ASSIGNING <WA_PRV1>.
IF SY-TABIX = 1.
cnt = 1.
MOVE <WA_PRV1>-ZREF_NUM TO REF_NUM.
ENDIF.
move <WA_PRV1>-ZPROVISION to I_AMOUNT_OLD.
CONDENSE I_AMOUNT_OLD.
*----old code
REPLACE ALL OCCURRENCES OF '.' IN I_AMOUNT_OLD WITH ','.
perform bdc_field using 'RF05A-NEWBS'
<WA_PRV1>-ZDEBI_CREDIT. "'40'.
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'RF05A-NEWKO'
<WA_PRV1>-ZACCOUNT. "'92902'.
*--->end of header screen
IF FIRST = 'N'.
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
* perform bdc_field using 'BDC_OKCODE'
* '=ENTE'.
perform bdc_field using 'COBL-GSBER'
'BATX'."''." <WA_PRV1>-ZBUS_AREA."
SHIFT <WA_PRV1>-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
<WA_PRV1>-ZCOST_CENTRE. "'716001'."
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
'92902'."<WA_PRV1>-ZACCOUNT. "
perform bdc_field using 'COBL-FIPOS'
'92902'. "<WA_PRV1>-ZACCOUNT. "
ENDIF.
*--->second screen
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'vv'.
perform bdc_field using 'DKACB-FMORE'
'X'.
*--->end of second screen
perform bdc_dynpro using 'SAPLKACB' '0002'.
perform bdc_field using 'BDC_OKCODE'
'=ENTE'.
perform bdc_field using 'BDC_CURSOR'
'COBL-KOSTL'.
* perform bdc_field using 'BDC_OKCODE'
* '=ENTE'.
perform bdc_field using 'COBL-GSBER'
'BATX'."''." <WA_PRV1>-ZBUS_AREA."
SHIFT <WA_PRV1>-ZCOST_CENTRE LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-KOSTL'
<WA_PRV1>-ZCOST_CENTRE. "'716001'."
SHIFT <WA_PRV1>-ZACCOUNT LEFT DELETING LEADING '0'.
perform bdc_field using 'COBL-FIPEX'
'92902'."<WA_PRV1>-ZACCOUNT. "
perform bdc_field using 'COBL-FIPOS'
'92902'. "<WA_PRV1>-ZACCOUNT. "
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'
I_AMOUNT_OLD.
perform bdc_field using 'BSEG-MWSKZ'
<WA_PRV1>-ZTAX."'VV'.
gt_itab1-ZREF_NUM = <WA_PRV1>-ZREF_NUM.
gt_itab1-ZTNAME = <WA_PRV1>-ZTNAME.
gt_itab1-ZCONTRACTNR = <WA_PRV1>-ZCONTRACTNR.
gt_itab1-ZVENDOR = <WA_PRV1>-ZVENDOR.
gt_itab1-ZPURCHASE_ORD = <WA_PRV1>-ZPURCHASE_ORD.
gt_itab1-ZCONTRACT_AMOUNT = <WA_PRV1>-ZCONTRACT_AMOUNT.
gt_itab1-ZSTART_DATE = <WA_PRV1>-ZSTART_DATE.
gt_itab1-ZEND_DATE = <WA_PRV1>-ZEND_DATE.
gt_itab1-ZPROVISION = <WA_PRV1>-ZPROVISION.
gt_itab1-ZACCOUNT = <WA_PRV1>-ZACCOUNT.
gt_itab1-ZBUS_AREA = <WA_PRV1>-ZBUS_AREA.
gt_itab1-ZCOST_CENTRE = <WA_PRV1>-ZCOST_CENTRE.
gt_itab1-ZTAX = <WA_PRV1>-ZTAX.
gt_itab1-ZDEBI_CREDIT = <WA_PRV1>-ZDEBI_CREDIT.
append gt_itab1 to gt_itab.
clear : gt_itab1.
SAKNR = <WA_PRV1>-ZACCOUNT.
FIRST = 'N'.
PERFORM simulation_data.
ENDLOOP.