Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

does DATA statement's line # matters?

$
0
0

Hello,

 

I have implemented a BADI (its regarding materila master) for z_my_program_1 purpose, but, this  z_my_program_1 will be executed once per quarter. In this program I placed the below code

 

IMPORT wa_vbfa TO wa_vbfa FROM MEMORY ID 'ZZ_VBFA'

 

As this BADI is relared to material master, some other programs also hitting / touching my BADIm say, z_my_program_2 is also interacting it. (I am aware that by doing some chacks I can filter the hits, no other program has the below statement in it), and this z_my_program_2 program touches this BADI tonns of times per day,

 

IMPORT wa_vbfa TO wa_vbfa FROM MEMORY ID 'ZZ_VBFA'

 

But, recently unfortunately bcz of some reason the zz_vbfa ended up in inconsistenct in PRD, hence  the z_my_program_2 prog. is dumping!!

 

DATA: it_vbfa TYPE STANDARD TABLE OF zz_vbfa. ==> Bcz of this statements's table's (zz_vbfa) inconsistency z_my_program_2 is dumping in PRD tonns of times.

DATA: wa_vbfa TYPE zz_vbfa.

IMPORT wa_vbfa TO wa_vbfa FROM MEMORY ID 'ZZ_VBFA'.

 

So, if change the above code as below Can we avoide dumps in PRD for the executions of z_my_program_2?

 

IMPORT wa_vbfa TO wa_vbfa FROM MEMORY ID 'ZZ_VBFA'. ==> I mean, z_my_program_2's control will come here and the IMPORT fails hence the control exits right away hence no chance of executing the below DATA statement, where we have a issue causing bad table, for which reason the dumps are in PRD occuring


CHECK sy-subrc = 0.

DATA: it_vbfa TYPE STANDARD TABLE OF zz_vbfa.

DATA: wa_vbfa TYPE zz_vbfa.

 

So, pls. let us know that by changing the sequence of statements, can we fix our issue? (We are aware there are other ways to fix this, but, bcz of some reasons, we want to go w/ this kind of approach)

 

Thank youi


Viewing all articles
Browse latest Browse all 10425

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>