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

message diaplay problem

Former Member
0 Likes
7,750

HI FRIENDS,

i have created a program to display the idoc details. Everything is working fine. what is my problem is my client need to display a message in output screen depending on how many idocs are ready to be processed.

for eg there are 10 idocs ready for processing then in the output screen h needs tht message teeling these no of idocs r ready for processing. So what code shud i use???

can u guyz help me.

Thanks and regards,

nawaz

1 ACCEPTED SOLUTION
Read only

latha_lambodaran
Discoverer
0 Likes
7,723

Hi Mohammed,

Can you provide some more clarity regarding 'IDocs ready for processing' and what details you are already displaying.

Its because Ready for processing may mean different in inbound and outbound scenarios. Like in outbound scenarios it may mean idocs with status 01 or 30.

Or in inbound scenarios it can be idocs with status 64.

Or it can be some other status based on clients requirement.

It would depend mainly on what data the client wants to see in the message.

35 REPLIES 35
Read only

Former Member
0 Likes
7,723

Hi there,

Create a message classe (eg. Zmessage). Create the message 001 'Number of idocs processed: &'.

Use the Message in the programm:

Message s001(Zmessage) with lv_number_of_idocs.

Best regards

Read only

0 Likes
7,723

lv_number_of_idocs??? what do i have to give.. i gave the variable i had created for ie v_docnum = edidc-docnum.


v_docnum is what i gave..bt not working

Read only

0 Likes
7,723

Hi Mohammed

Are you wanting to output a count, because it looks like the field you are using refers to an actual Idoc on EDIDC

Regards

Arden

Read only

0 Likes
7,723

hi,

Yes i want the total no of idoc processing count. Like when i execute it shud show me a mesg tht these many no of idocs r reday to process. if 10 its shud so 10.

Read only

0 Likes
7,723

and yes the field is of edidc. because im getting the details of idocs...so i need the processd idocs?

Read only

0 Likes
7,723

Hi Mohammed

As per the response from Nicolaus.

Set the your count value into lv_number_of_idocs.

Then output the message as indicated.

Set Message s001(Zmessage) with lv_number_of_idocs

Regards

Arden

Read only

0 Likes
7,723

CAN YOU WRITE ME THE CODE?? LIKE WHAT I HAVE TO WRITE..

IS IT THAT I HAVE TO CREATE A VARIABLE WITH lv_number_of_idocs FOR EDIDC-DOCNUM? PLEASE HELP

Read only

0 Likes
7,723

Hi Mohammed,

You can create one more internal table with fields STATUS type EDIDC-STATUS and COUNT type I.  Inside loop of EDIDC, collect this internal table with value of COUNT as 1. 

Loop at edidc....

lt_edidc_status-status = edidc-status.

lt_edidc_status-count = 1.

collect lt_edidc_status. "This would add up count every time same status is encountered.

endloop.

This way you can have a count of Idocs of a particular status.

Reward if useful.

Regards,

Shailesh Nagaonkar.

Read only

0 Likes
7,723

Shailesh i dint get you.. i need the total no of docnum(idoc no) in my display. if u can c a screen shot.. i want the total no of that docnum as a message alng wit my output.

in my screen shot case when i click on output i need a message saying

TOTAL NO OF IDOC : 12.

Read only

0 Likes
7,723

Hi Mohammed,

Above logic provided to you to get no of idocs of that particular status.  If you want to get total no of idocs, then you can use DESCRIBE statement as you mentioned.  And you can put that number in Title as well wherein you've mentioned just 'idoc', that would look good instead of message which would go away once clicked.

Please let me know if i understood your requirement or not.

Regards,

Shailesh Nagaonkar

Read only

0 Likes
7,723

HI,

YES I GOT IT. I FEEL DESCRIBE TABLE IS THE BEST OPTION.. BUT NOW I WILL IHAVE TO SPECIFY IN MY ALV REPORT.. I NEED TO USE TOP OF PAGE EVENT.. BUT I DONT KNOW HOW... CAN U HELP ME OUT???

THANKS

Read only

latha_lambodaran
Discoverer
0 Likes
7,724

Hi Mohammed,

Can you provide some more clarity regarding 'IDocs ready for processing' and what details you are already displaying.

Its because Ready for processing may mean different in inbound and outbound scenarios. Like in outbound scenarios it may mean idocs with status 01 or 30.

Or in inbound scenarios it can be idocs with status 64.

Or it can be some other status based on clients requirement.

It would depend mainly on what data the client wants to see in the message.

Read only

0 Likes
7,723

THIS IS MY OUTPUT SCREEN. IF U CAN C I HAVE SELECTED IDOC NO ROW.

WHTA MY CLIENT WAS IS WHEN H GETS THIS OUTPUT SCREEN ALONG WITH THIS HE ALS NEED A MESSAGE TELLING HOW MANY IDOCS ARE READY TO PROCESS..

IN HERE THERE ARE 12 IDOC READY FOR PROCESS SO THAT IS THE MESSAGE I NEED TO GET IN THIS OUTPUT SCREEN.

Read only

0 Likes
7,723

GUYZ I GOT IT...THIS IS THE CODE I USED.

DATA : V_LINES TYPE I. "declare variable
  DESCRIBE TABLE <ITAB> LINES V_LINES. "get no of rows
  WRITE:/ V_LINES. "display no of rows.

BUT OLY PRB IS ITS COMING IN DIFFERENT SCREEN. NOT IN THE ABOVE SCREEN.

Read only

0 Likes
7,723

Hi Mohammed,

You can simply add a header or footer indicating the number of idocs ready instead of going through displaying messages.

In case you need it in Message only then do as below, Put thses code just after the FM call for display.

1) get the no of idocs that is ready into a variable(l_count), in the above case say 12. Please note it can be any variable that you can display.

2) Now display the message as shown below, just use the same code lines,

message I001(message class) with l_count.

For further details check the below link.

Number of ways to display the messages - ABAP Development - SCN Wiki

Regards,

Satish

Read only

0 Likes
7,723

Hi Mohammed,

This could be wrong.  This will only applicable when you've all the records with same Status. 

As provided in my reply earlier, you can use that code to find out no of records for same status and update first IDoc record with new column in ALV for no of records.

That way it will be as shown below:

IDocNO     Status     Total status

1               30            3

2               30              

3               30         

4               10            2

5               10         

   

With Write statement, it'll write on the new screen and not on ALV screen.

Regards,

Shailesh Nagaonkar.

Read only

0 Likes
7,723

BUT I DONT WANT THE STATUS I WANT THE NO OF IDOCS GENERATED AS A MESSAGE

DATA : V_LINES TYPE I. "declare variable

  DESCRIBE TABLE <ITAB> LINES V_LINES. "get no of rows

  WRITE:/ V_LINES. "display no of rows.


I USED TIS CODE AND I GOT THE ANS.. BUT IITS CMIN IN DIFFERENT SCREEN.. I WANT IN THE SAME SCREEN I E ALV SCREEN OUTPUT...


I NEED TO USE TOP OF PAGE EVENT... ANY SUGGESTIONS HOW CAN I DO IT.??


THANKS GUYZ.


Read only

0 Likes
7,723

Hi Mohammed,

You can put this in TOP OF PAGE event of ALV.  You need to define a subroutine in ALV FM call.

If you're using FM 'REUSE_ALV_GRID_DISPLAY', there'll be a export parameter as shown below:


I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'

The value provided here would be a subroutine name and you need to define a body for this as shown below:

FORM TOP_OF_PAGE

data:

      git_top    TYPE slis_t_listheader,

       gwa_top    TYPE slis_listheader.

  gwa_top-typ = 'H'.

   gwa_top-info = v_lines.

   APPEND gwa_top TO git_top.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

     EXPORTING

       IT_LIST_COMMENTARY = git_top.

ENDFORM.

OR

you can set below export parameter with the value available in your message:

I_GRID_TITLE                      = v_lines "Char field containing your message'



Reward if useful.


Regards,

Shailesh Nagaonkar.

Read only

0 Likes
7,723

Hi shailesh,

Thanks alot. your ans helped me alot.

also thx to other for helping me out.

thanks

nawaz.

Read only

0 Likes
7,723

btw shailesh how to regrads, just got mark yur reply correct answer write.. i have don that.. if i have to do smethng els to reward plz tel me ill do it.

Read only

0 Likes
7,723

Thanks Nawaz, it was my pleasure to help you.

Read only

0 Likes
7,723

hi shailesh,

i have one mre doubt.. now my output looks like this..

but i need the top of page to be displayed with this mesg

TOTAL NO OF IDOC GENERATED ARE 12.

CAN U PLEASE TEL ME WARE I NEED TO CHANGE THE CODE???

THANKS,

NAWAZ

Read only

0 Likes
7,723

Hi,

Please append the below values to the table git_top as below,

  CLEAR wa_header.

  wa_header-typ  = 'S'

  wa_header-key = 'Total Number of IDOC generated' .

  wa_header-info = sy-cprog.

  APPEND wa_header TO git_top.

Regards,

Satish

Read only

0 Likes
7,723

Hi Nawaz,

You can create a text symbol with text 'TOTAL NO OF IDOC GENERATED ARE' and then concatenate this text and your count (Should be transferred to text field) into final text separated by space.

Syntax would be : concatenate text-001 v_count_text into v_final_text separated by space.

Where

text-001 = TOTAL NO OF IDOC GENERATED ARE

v_count_text = count of idocs

v_final_text = final text variable which is to be displayed.

Regards,

Shailesh Nagaonkar.

Read only

0 Likes
7,723

You should write above concatenate in same TOP_OF_PAGE subroutine which used to display information.

Read only

0 Likes
7,723

hi satish,

its still not displaying

Read only

0 Likes
7,723

hi shailesh,

what is v_count_text in my prog?? v_lines?

what is v_final_text???

dint get you

Read only

0 Likes
7,723

Yes, v_count_text would be your final idoc count i.e. v_lines and v_final_text would be your final text which you want to display and would go into gwa_top-info = v_final_text.

You first need to create these 2 text variables and move v_lines to v_count_text and then concatenate text-001 v_count_text into v_final_text separated by space.

Regards,

Shailesh.

Read only

0 Likes
7,723

thanks bro..its working

Read only

0 Likes
7,723

hi,

now my next task here is i have to push thes idocs to port... we14 transaction is to push..

in this screen you can c there is a process button.. i need to write some code so tht wen user press proceed all db status idoc need to be pushed to port...

what code i need to rite??

Read only

0 Likes
7,723

Hi Nawaz,

I would request you to create new thread for this.

Regards,

Shailesh Nagaonkar.

Read only

0 Likes
7,723

hi shailesh,

i am realy new to all these.. can u tell me want i need to do exactly...it could be a lot of help.

i need to write my code under tis...

need to write it under display..

thanks

Read only

0 Likes
7,723

Hi Nawaz,

Analyze program RSEOUT00.  This program takes input as IDoc number and processes if not processed. 

Regards,

Shailesh.

Read only

0 Likes
7,723

hi,

yes this prog is nothing but we14 ware we process the idoc.. but i dont want to go to tht t.code and process... what my clint wants a programe in which when some idocs r ready to processs h press process button and all idocs in the list shud be pushed...

this is the requirement.

After seeing total amount should show ok or cancel button. If ok idoc payment should be  send to portal .if cancel payment should not process to bank.


this is what he is asking..

so if you can help me out...


regards,

nawaz

Read only

0 Likes
7,723

Hi Nawaz,

Try below code in event button clicked.  Below code is extract of WE14.  Just try with this, if it works, good, otherwise needs to analyze WE14 in deep.

DATA: BEGIN OF COM_EDIDC OCCURS 0.

        INCLUDE STRUCTURE EDIDC.

DATA: END OF COM_EDIDC.

DATA: BEGIN OF INT_EDIDD OCCURS 1.

        INCLUDE STRUCTURE EDIDD.

DATA: END OF INT_EDIDD.

loop at edidc . " Loop at Output records

refresh: com_edidc[], int_edidd[].

move corresponding edidc to com_edidc.

append com_edidc.

    CALL FUNCTION 'EDI_OUTPUT_NEW'

         EXPORTING

              ONL_OPTION  = 'B'

*             ERROR_FLAG  = ' '

*             NAST_RECORD =

         TABLES

              I_EDIDC     = COM_EDIDC

              I_EDIDD     = INT_EDIDD

         EXCEPTIONS

              OTHERS      = 1.

    CALL FUNCTION 'DEQUEUE_ALL'

*        EXPORTING

*             _SYNCHRON = ' '

         EXCEPTIONS

              OTHERS    = 1.

Regards,

Shailesh Nagaonkar.