Recently, in an ABAP program, I had a requirement to HIDE or SHOW a selection screen parameter based on whether one or the other radio button choice was made.

One choice of the radio button would be “manual mode”, in which the user could select material numbers in a SELECT-OPTIONS parameter. With manual mode, I obviously want the matnr parameter to show for the user.

The other choice would be “batch mode” in which those same materials will be read from a custom table.  If batch mode is selected from the radiobutton group, I do NOT want the matnr parameter to show.  I would then fill the SELECT-OPTIONS table for matnr with the values from the custom table.  In this way, later “SELECT IN” syntax could be used for the material number range in both cases.

Here are code snippets:


 matnr FOR  mara-matnr MODIF ID md2.



   IF p_man 'X'.
       IF screen-group1 'MD2'.
         screen-invisible 0.
         screen-input     1.
       IF screen-group1 'MD2'.
         screen-invisible 1.
         screen-input     0.
   IF p_batch 'X'.
     PERFORM material_exclusion_list.

FORM material_exclusion_list .
   DATAwa_matnr LIKE mara-matnr.
   CLEAR matnr.
   REFRESH matnr.
      FROM zpp_demand_excl
      INTO wa_matnr.
     matnr-low wa_matnr.
     matnr-sign 'E'.
     matnr-option 'EQ'.
     APPEND matnr.


The Holy Spirit moved my son Ryne to write a little song about the sermon this morning.


I know he’s no great musician or anything, but it was cool to see how closely he was listening, and how he took the message to heart.

Don’t Stop Fighting
By: Ryne Hilden

We are but sheep among ferocious wolves.
But don’t stop fighting.
Though their words are like knives.

Don’t stop fighting
In the name of Jesus

We will spread your word at all cost.
We must be as smart as a serpent but as illusive as a dove
But don’t stop fighting.

If you abide in Jesus you will not get lost.
You WILL face overt hostility that I can guarantee.
Be deep rooted you can’t be stopped.

Don’t stop fighting
In the name of Jesus

Your brother your father your wife and child will rise!
Your worldly leaders will strike you down.
It will take you by surprise.
Turn around and look at what has shrouded you

Don’t stop fighting
In the name of my savior Jesus.

Time out for reading

“He had forgotten that God saw through the silk robes to the sinful heart, that the only wealth worth having was treasure in heaven, and that even the king had to kneel down in church. Feeling that everyone else was so much more powerful and sophisticated than he was, he had lost sight of his true values, suspended his critical faculties, and placed his trust in his superiors. His reward had been treachery.” (Great paragraph from the book I’m reading, The Pillars of the Earth by Ken Follett).

In Sept 2011, I blogged about a problem with MMCHACTV (MM13) and a mysterious error that complained of an unknown “the ECO is already confirmed”.
I spent a lot of time with our engineering dept and found two very helpful things:

  1. the program has a test mode and will show the error for any date you run it for that might have a problem
  2. the test mode doesn’t do ANY updates or cause any issues (as its name implies). It can be run as many times as you like
  3. we found by making the program error in test mode on certain days…problems with ECO status on those days
    • use table PCDHDR to find the ECO/ECR change record numbers
    • use trx CC03 and the status management button in the middle to see each ECO and examine status
  4. make sure the statuses on all ECO/ECRs is what they should be for any problem days and then rerun MM13 in test mode
  5. This was a huge help because now we can proactively find error days if ECOs aren’t set up right, and fix them, before the program runs LIVE. In the past, when the program would crash, we had no choice but make that day’s changes manually, which could take hours if not days. A really good find!

I’m going away from the normal topic to write about a little boy that was in my wife’s daycare for over a year. He was diagnosed with a brain tumor and, after an operation died within a week.
This has struck my wife and our whole family very hard, and showed us how fragile life is. It’s also a time that we’ve reflected on the sovereignty of God and seeking His peace and understanding.
At the wake tonight, even though I was a mess and wiping off unexpected tears, his Dad told me as we talked very briefly: “At least we all got to know him for a little while”. He was 22-months old when he died, and the kind of boy that lit up a room whenever he went into it. He always had a smile and was very lovable and just a joy to be around. I think I know what his dad meant, even though my friend next to me in line said to me afterwards that she thought it was an odd comment.
Another friend was discussing these things with us all outside the funeral home and mentioned that none of us really know all about why we are here. The thought that this little angel was here to show us a little about life through his constant smile, his love of life, and his laugh is comforting. God can teach us things in any way He chooses and can use us in ways we didn’t think of, and others didn’t plan for.
Just thinking on this sad weekend. The funeral is tomorrow.

Emailing an ABAP report is much easier than you might imagine. Recently my boss wanted one of our ad-hoc ABAP reports to be emailed to him daily.

Rather than fool around with function modules from within the program and turning the output into an emailed report, I found that all I needed to do was schedule the report to run (SM36) and right there in the Job Create page was all I needed:

1) Select the Spool list recipient button on the right side of the page, near the top
2) In the popup that results, choose the recipient’s email address and check “Express”. Finish by hitting the Copy button.
3) The Spool will be sent to the SOST queue, where it will be e-mailed out as often as your job in SCOT is setup to send output. In the case above, I had the same program run with 2 different variants as two different steps.
4) Those two steps produced two e-mails in SOST (and in my boss’s inbox) with the report.htm extension. This shows up looking exactly like it does in SAP, only it’s rendered in a browswer.

That’s all there was to it for us! 🙂 Worked like a charm, so I thought I would share this tip.

Recently, my co-worker and I have been trying to bolt on Windows app servers to our AIX SAP installation, in an effort to save money compared to the cost of buying more AIX app servers.

This was going well, until we discovered that Vertex (the 3rd party software that we use for tax calculation and jurisdiction information) couldn’t be called from the Windows side without the Vertex Translink executable on the Windows servers.

When asked, Vertex suggested that we would need to purchase additional licensing (for Windows in addition to the AIX one that we have) to solve this.

My co-worker discovered that Vertex could be called from the Windows app servers, through SM59 RFC destinations that were set up as “Start On Explicit Host” in the SM59 connection.

This got us around the problem, but we are still validating all the interfaces to and from the new Windows app servers and Vertex to make sure things are working correctly.