‎2010 Dec 16 1:51 PM
Dear forum members,
I recorded the transaction ABT1 with the transaction recorder. My program uploads a txt. file and builds up a batch input session where it transfers assets from one company to the other. And after uploading the assets nummbers via txt. it takes another data from tables like the ANLA, ANLC and so on.
Now sometimes it happens that the requested data is not in the table and then the batch input session breaks up.
I wan`t to ask whether there is a opportunity to jump to the next dynpro WITHOUT showing ...Dynpro 'SAPLSPO4' '0300' is not filled....???
Following code:
perform bdc_dynpro using 'SAPLSPO4' '0300'.
perform bdc_field using 'BDC_CURSOR'
'SVALD-VALUE(01)'.
perform bdc_field using 'BDC_OKCODE'
'=FURT'.
perform bdc_field using 'SVALD-VALUE(01)'
'2100'.
perform bdc_dynpro using 'SAPLAMDP_OLD' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RAIFP2-XNOER'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'RAIFP1-BLDAT'
da_bldat.
perform bdc_field using 'RAIFP1-BLART'
Belegart."'AM'.
So: If there is no data in 'SAPLSPO4' '0300' I would like my programm to jump to the dynpro 'SAPLAMDP_OLD' '0100' without ending the batchinput session!!!
Are there any opportunities???
Thank`s in advance
‎2010 Dec 16 1:56 PM
You'll need to program that in your code where you build your BDC tab.
‎2010 Dec 16 2:01 PM
Hi,
Check for which set of data the error is coming and add the if condition accordingly in your code.
Regards
Praveen
‎2010 Dec 16 2:11 PM
@praveen reddy: That`s the point. When I want to have the anla-invnr and there is no invnr filled what can I do???
@Maen Anachronos: I have not created the BDC tab, it is done by the transaction recorder in the SHDB. I don`t really understand what you mean!?
‎2010 Dec 16 2:20 PM
You made a recording in SHDB. You converted that recording into a program. Hence the program you created contains the logic to build up the BDC table.
Now, look in that program where it starts filling the screen you don't want and program you validation before it gets to that part. If it meets your validation, have the program fill the BDC tab as originally recorded, If it doesn't meet your criteria, make sure if doesn't prepare the screen yoiu don't want.
‎2010 Dec 17 5:31 AM
Hi
I beleive the BDC runs inside the loop of your internal table and gets the data from the internal table to the BDC table and then move the data to screen fields and updates it later.
So for dynpro SAPLSPO4' '0300 you can check the blankness of the records and if it is not blank then only perform the BDC else exit and move to next bdc (if applicable).
Thanks
Lalit Gupta
‎2010 Dec 19 11:58 AM
Hi,
I wan`t to ask whether there is a opportunity to jump to the next dynpro WITHOUT showing ...Dynpro 'SAPLSPO4' '0300' is not filled....???
when record the program as per requirement.
By an shdb you can recorded your program .
as per recorded progarm then you started coding .
.
In coding, check whether the data is filled or not
if it is not filled means the data is not assigned or it takes to be blank spaces.
In bdc have inside the loop of internal table and retrive the data from internal table to the bdc and it transfers the data to dynpro
check loop dynpro SAPLSPO4' '0300 check the blankness of the records and if it is not blank then only perform the BDC
else it executes another bdc
and better to write this step as check each screen is executing one by one by this step perform bdc_field using 'BDC_OKCODE' = '/00'
it checks each screen is filling correct data or not.
If it is intial then it jumps to the next dynpro.
Edited by: chandrasek on Dec 19, 2010 1:59 PM
Edited by: chandrasek on Dec 19, 2010 2:04 PM
‎2010 Dec 20 9:44 AM
Thank`s for all your answears,
I`ve solved my problems by recording it over and over again with the SHDB until it was ok.
‎2010 Dec 20 9:44 AM