Application Development and Automation 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: 
Read only

Output documents and SAP Scripts

Former Member
0 Likes
468

We have an ever increasing problem with Sap Scripts and driver programs for Output Documents. There is a lot of hard coded stuff in the driver programs based on output type.

I

If nast-kschl = 'XX'
 Do something 
elseif nast-kschl = 'YY' 
 Do something else 
Endif

This is causing a lot of maintainance problems. Logically, such conditional behavior is required. We need to execute different logic for different output types. Similarly there are hard coded conditions based on parameters.

for e.g.

select * from knvk where kunnr = hardcoded and abtnr = hardcoded

The problem is that all this custom hard coded logic is dispersed through out the program and it becomes difficult to maintain them.

I was wondering how folks on SDN have tackled this problem at your various clients.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
448

Hi,

1.Standard Text is client dependent.So,in scripts we can handle as done.

2.There is another option,The conditions can call in the layout and pass the condition type and write include text .

3.The hardcoded text can be maintained in the SO10.

Regards,

Shiva

3 REPLIES 3
Read only

Former Member
0 Likes
449

Hi,

1.Standard Text is client dependent.So,in scripts we can handle as done.

2.There is another option,The conditions can call in the layout and pass the condition type and write include text .

3.The hardcoded text can be maintained in the SO10.

Regards,

Shiva

Read only

Former Member
0 Likes
448

S Kumar -

I think you may have misunderstood my original question.

Consider this scnerio:

If nast-kschl = 'XX'
     var1 = A 
     var2 = B
elseif nast-kschl = 'YY'
     var1 = C
     var2 = D
Endif

This is a simplified version of what the problem is. There are many output types and many different business logic that are conditionally applied. This is creating havoc in my driver programs. Plus these are 10 year old driver programs. They have been maintained over and over again and numerous changes have taken place.

We would not want to face a similar issue for our next implemention and am wondering what the best solution to this problem would be. Going Smartforms? Would that help?

Read only

0 Likes
448

Hi,

1.If u use smartforms ,u can write the conditions in program lines ,wherever u need.

2.Total conditions need not be put in driver program.So it appears simply.

I think in scripts ,we cann't write other than that.

Regards,

Shiva.