Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynpro problems / SHDB

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

You'll need to program that in your code where you build your BDC tab.

Former Member
0 Kudos

Hi,

Check for which set of data the error is coming and add the if condition accordingly in your code.

Regards

Praveen

0 Kudos

@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!?

0 Kudos

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.

Former Member
0 Kudos

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

chandra_sekhar3
Explorer
0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

Made record again and again.