cancel
Showing results for 
Search instead for 
Did you mean: 

How do i blank compress the table header?

yogesh_mj9
Explorer
0 Kudos

Hi Experts,

Hope you all are doing good.

I have a question which i believe could be pretty simple to you guys, which is regarding the table header that needs to be blank compressed.

I am finding it difficult.I tried methods to blank compress the table header if there  are no contents present in the table, but was unsuccessful.

The ways which i tried has been included in the document attached for your reference.

I tried using blank compression technique by selecting few control symbols first. When i used it, even if there were contents in the table, the table header along with the table contents were blank compressed.( No values were visible in the report along with the header ).

So i tried to use conditional output by specifying conditions for a control symbol ( in this case i have used Sequence number as the control for conditional output. I tried the condition <15BIF007(AND:01RDPPSEQ GE 1)> , if this condition is true, print the table header along with the contents, if not

<15CIF007> , blank compress the entire table header.

I request you all to kindly look at the attachments and help me out with this situation.

Your help is very much appreciated.


Many thanks in advance,


Yogesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Probably the easiest method to compress the header is to have two loops.  The first one only loops at the first entry and will print the header.  The second loop goes through all the entries and prints the values. 

<11BRG001(EXIT;RPR_PP;1)>

PRINT HEADER

<11ERG001>

<11BRG002(EXIT;RPR_PP;*)>

PRINT DATA

<11ERG002>

Answers (2)

Answers (2)

tuba_ipek
Discoverer
0 Kudos

Hi C.B, Ralph & Peter,

Many thanks for all your replies.

They were very helpful. Just an update on the situation, I was able to blank compress the header.

Simple, i just inserted a separate repeating group of the same type but with one iteration.

This was suggested by Peter Denero. In that way i was able to blank compress and print process.

Below is the code which i used

<11BRG001(EXIT,RPR_PP;1>

<15BIF002(AND:01RDPPSEQ GE 1)>

Here comes the table header

<15EIF002>

<ERG001>

<BRG003(EXIT,RPR_PP;*>

<BRG005(D;*)>

<15BIF004(AND:01RDPPSEQ GE 1)>

Here comes the table contents

<15EIF004>

<ERG005>

<ERG003>

and i was sucessfully able to print PPs values according to the requirement.

Below are the screenshots for ur reference.

output:

Stage 500 doesnt contain any PP.

So we have the table blank compressed in the output below.

Output:

Finally, I thank all again for the efforts you guys put in to help me.

I appreciate that.

Best Regards,

Yogesh

christoph_bergemann
Active Contributor
0 Kudos

Dear Jogesh

you need to perform "different" nesting in WWI. Normally you open the main repeating group; now it seems to be that you havbe first insertzed the header part and then checked for values; this is in my opinion the "wrong" nesting. First check values and then print header)

C.B.

PS: you have used a "very" special repeating group; why do you need it??

11BRG094(EXIT; RPR_PP;*) (check e.g. Example: User Exit Repeating Groups - Basic Data and Tools (EHS-BD) - SAP Library)

yogesh_mj9
Explorer
0 Kudos

Hi Christoph,

Firslty, many thanks for your quick reply.

I did change the code after your suggestions.

I was able to blank compress the table in the output when there are no values in the table.However, now the table header itself is printed for each occurence of a sequence for a stage that consists of more sequences or process parameters. Kindly refer to 3rd screenshot(marked in red) below which is O/P.

FYI, the special repeating group which you were asking about is the repeating group which we always use here to get to Process Parameters.

Now that the problem of blank compressing the table header along with table contents if there are no values in the table is solved, kindly suggest how to proceed with the new problem that I have now.

Best Regards,

Yogesh

OUTPUT

Ralph_P
Advisor
Advisor
0 Kudos

Hi Yogesh,

around the call for the header, insert a repeating group of type D (Discrete expansion). Then it will be printed only once.

However, if I understood your intial post correctly, I don't see the need for a conditional output. A simple blank compression, used correctly, will do the trick.

Ralph

yogesh_mj9
Explorer
0 Kudos

Hi Ralph,

Thanks for your reply. I inserted a repeating group of type G. But still the header is printed twice.

Please find the below screenshots for your reference.

Screenshot 1: Discrete repeating group added

Output :

I tried blank compression technique as well.

Screenshot 2 : Blank compression 1

Output : Neither the header nor the values are printed.

Screenshot 3 : Blank compression test 2

Output : I was able to print the values and blank compress if there were no values(Stage 400 blnk compressed).

But again the header is printed twice.( Stage 300 )

Kindly help me with this situation.

Best regards,

Yogesh

Ralph_P
Advisor
Advisor
0 Kudos

Hi Yogesh,

sorry, the type D repeating group was the wrong answer. Seems you have chosen a wrong nesting.

This code:

produces this output if data are present:

and this output if no data are present:

I believe that is what you are looking for.

Ralph

yogesh_mj9
Explorer
0 Kudos

Hi Ralph,

I tried this technique too.

I am short of options. Before posting a query here i tried out various things, but couldn't get the issue fixed. can you please help ?

Output :

Best Regards,

Yogesh

Ralph_P
Advisor
Advisor
0 Kudos

Hi yogesh,

try deleting the called user exit RPR_PP in repeating group 094 and make a "normal" master repeating group out of it (<11BRG094(M,...;*)>).

Ralph

yogesh_mj9
Explorer
0 Kudos

Hi Ralph,

I appreciate your kindness to help, but I cannot include a master repeating group, because there is no value assignment defined for Process parameters. Only User exit is defined for the process parameters.

Please find the screenshots below. To get to Process parameters tab, this RPR repeating group is used. The details are then fetched from here. I tried to use the Master repeating group for this , but couldn't find the value assignment for this 😞

Ralph_P
Advisor
Advisor
0 Kudos

Hi Yogesh,

can you change the repeating group to run over the description or the unit of measurement? Are there value assignments defined for them? This doesn't look like EH&S to me, rather RM or PP.

If the above doesn't work, I'm afraid I don't know what to do.

Ralph

christoph_bergemann
Active Contributor
0 Kudos

Dear Yogesh

I am not "100%" sure if your "EXIT" group is the right one; but honestly: there was never the need to generate a WWI layout with nealry only 100% of data coming from other modules than SAP EHS;

My "greatest" doubt is: 11BRG094(EXIT; RPR_PP;*)

Normally any with "EXIT" belongs to very special WWI logic did you checked if there is a different group in plac? How did you fidn this group as suitable and entered in WWI layout?

C.B.

Ralph_P
Advisor
Advisor
0 Kudos

Hi Yogesh,

Think about this: When the exit RPR_PP is called for the first time, all variables it fills with data are of course empty since they haven't yet been filled. As a result, the header is not printed when no data are available since the exit variables have never been filled. If one set of data is found, the variables of the exit are filled, thus the header is printed since the BNG group doesn't apply (exit is not empty). Through the repeating group now a second set of data is searched. The BNG group for the header doesn't apply since the variables therein are still filled from the first round. So the header is printed again.

If this thought is correct, then you need to change the exit so that after a first run through the repeating group the content of the variables of the exit are deleted. If they are empty, the BNG will suppress printing the header.

Ralph