This website is not affiliated with, sponsored by, or approved by SAP AG.

MB90 Print Good Movements in One page

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

MB90 Print Good Movements in One page

Postby tgfch » Tue Apr 03, 2007 8:10 am

Hi

I have copied (SAPScript) WA_SCHEINVERS1 to a ZWA_SCHEINVERS1 to make some changes, I need to print in one page two position of a Good Movements(MB90), because one page printed contains first position and next page second one.

I will appreciate any helpfull information

Thanks in advance
Regards
Tokio
tgfch
 
Posts: 7
Joined: Tue Apr 03, 2007 7:49 am

Postby RosieBrent » Tue Apr 03, 2007 2:33 pm

Can you possibly illustrate your example with some more information, I can tell by your post that English is not your first language, but I can't work out what you're trying to ask.
Kind Regards

Rosie Brent

Please remember to search the forum and check the FAQ before posting questions, thank you.

Tuly Idiot most of the time, part-time Guru Image
RosieBrent
 
Posts: 6197
Joined: Mon Oct 21, 2002 3:04 am
Location: Darlington

MB90 Print Good Movements in One page

Postby tgfch » Wed Apr 04, 2007 10:42 am

RosieBrent wrote:Can you possibly illustrate your example with some more information, I can tell by your post that English is not your first language, but I can't work out what you're trying to ask.


Hi Rosie

I really apologize because English is not my first language, but I will try to explain myself:
One of my requirement was copy a standard SAPscript WA_SCHEINVERS1 for Good Movements printing to ZWA_SCHEINVERS1 make some changes, like include some text etc...

In order to visualize changes made to the form, I go to transaction MB90, I put some parameters and system show me a list of two position of Material Document.

I check two of these positions, go to menu EDIT and select PROCESS option, after this process I get each position in one sheet, on printer:
Sheet1 - Position1
Sheet2 - Position2


I need to print in one sheet two position.

Sheet1 - Position1 & Position2


I will thank you if you can help me.

Tokio
tgfch
 
Posts: 7
Joined: Tue Apr 03, 2007 7:49 am

Postby RosieBrent » Wed Apr 04, 2007 1:59 pm

Okay - you're trying to get line items 1 and 2 on the same piece of paper not on separate pages?

When you call your SAPScript from your print program when do you loop at your item level information? It is likely that you are starting the form each time rather than starting it once for each document and then looping round the item level information.

If you need more help try posting some of the code of your print program to attempt to illustrate how you are feeding your data to the layout set.
Kind Regards

Rosie Brent

Please remember to search the forum and check the FAQ before posting questions, thank you.

Tuly Idiot most of the time, part-time Guru Image
RosieBrent
 
Posts: 6197
Joined: Mon Oct 21, 2002 3:04 am
Location: Darlington

Postby tgfch » Wed Apr 04, 2007 3:45 pm

Rosie

Thanks for your reply, let me tell you that I tried to do that, in fact I copied the standard program SAPM07DR to ZSAPM07DR for testing, but I didn't find how to reproduce the LOOP.

There is a perform on one of the includes:

Code: Select all
*---------------- Warenausgangsschein Version 1 -----------------------*
FORM entry_wa01 USING ent_retco ent_screen.
  xscreen = ent_screen. Break TFRANCO.
  CLEAR ent_retco.
  PERFORM lesen_wa USING nast-objky.
  ent_retco = retco.
  PERFORM BELEGPOSITION TABLES AUX_MSEG
                        USING  MKPF-MBLNR.
  PERFORM ausgabe_wa01.
ENDFORM.


Code: Select all
*------------- Warenausgangsschein Version 1 --------------------------*
FORM ausgabe_wa01.
  PERFORM open_form. BREAK TFRANCO.
  PERFORM wa01_druck.
  PERFORM close_form.
ENDFORM.                    "ausgabe_wa01
*eject.


Code: Select all
*-------------- Druck Vorbereiten -------------------------------------*
FORM open_form.
  PERFORM itcpo_fuellen.
  CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      device   = 'PRINTER'
      language = language
      options  = itcpo
      dialog   = ' '.
  PERFORM lesen_t159p.
  x_open = x.
ENDFORM.

Code: Select all
FORM WA01_DRUCK. BREAK TFRANCO.
  CALL FUNCTION 'START_FORM'
    EXPORTING
      FORM     = TNAPR-FONAM
      LANGUAGE = LANGUAGE.
  IF NOT T159P-BACOD IS INITIAL.
    BELPOS-MBLNR = MKPF-MBLNR.
    BELPOS-ZEILE = MSEG-ZEILE.
    CONDENSE BELPOS NO-GAPS.
    AM07M-BELPOS = BELPOS.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        ELEMENT = 'BACOKOPF'.
  ELSE.
    CALL FUNCTION 'WRITE_FORM'
      EXPORTING
        ELEMENT = 'KOPF'.
  ENDIF.
*------------- Drucken Belegposition ---------------------------------*
  CLEAR: AM07M-KOTXT, AM07M-KONTIERUNG.
  CASE XSKKZ.
    WHEN XFERT.                            "Fertigungsauftrag
      AM07M-KOTXT = TEXT-062.
      AM07M-KONTIERUNG = MSEG-AUFNR.
*   when xkdanr.
    WHEN XVBELG.
      MOVE SPACE TO KUNDE.
      AM07M-KOTXT = TEXT-030.
      KUNDE-KDAUF = MSEG-KDAUF.
      KUNDE-KDPOS = MSEG-KDPOS.
      KUNDE-KDEIN = MSEG-KDEIN.
      MOVE SPACE TO AM07M-KONTIERUNG.
      CONDENSE KUNDE NO-GAPS.
      AM07M-KONTIERUNG = KUNDE.
    WHEN XANLAGE.                            "Anlage
      MOVE SPACE TO ANLAGE.
      AM07M-KOTXT = TEXT-040.
      ANLAGE-ANLN1 = MSEG-ANLN1.
      ANLAGE-ANLN2 = MSEG-ANLN2.
      MOVE SPACE TO AM07M-KONTIERUNG.
      CONDENSE ANLAGE NO-GAPS.
      AM07M-KONTIERUNG = ANLAGE.
    WHEN XKOSTL.                             "Kostenstelle
      AM07M-KOTXT = TEXT-050.
      AM07M-KONTIERUNG = MSEG-KOSTL.
    WHEN XPROJN OR XNPLAN.                   "Projekt/Netzplan
      IF MSEG-NPLNR IS INITIAL.
        AM07M-KOTXT = TEXT-060.
        PERFORM PSP_CONVERT USING MSEG-PS_PSP_PNR.
      ELSE.
        AM07M-KOTXT = TEXT-061.
        AM07M-KONTIERUNG = MSEG-NPLNR.
        PERFORM NW_VORGANG_LESEN USING MSEG-AUFPL MSEG-APLZL.
        IF NOT N_VORNR IS INITIAL.
          MOVE '/'     TO AM07M-KONTIERUNG+12.
          MOVE N_VORNR TO AM07M-KONTIERUNG+13.
        ENDIF.
      ENDIF.
  ENDCASE.
* User-Exit über Erweiterung MBCF0005
  CALL CUSTOMER-FUNCTION '001'
       EXPORTING
            I_MKPF  = MKPF
            I_MSEG  = MSEG
            I_NAST  = NAST
            I_TNAPR = TNAPR
       CHANGING
            C_AM07M = AM07M
       EXCEPTIONS
            OTHERS  = 0.

  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      ELEMENT = 'POS_ZEILE'.

*--------------- Drucken Belegfuß -------------------------------------*
  PERFORM TAB156T_LESEN.

  CALL FUNCTION 'WRITE_FORM'
    EXPORTING
      ELEMENT  = 'FUSS'
      WINDOW   = 'FUSS'
      FUNCTION = 'APPEND'.

  CALL FUNCTION 'END_FORM'.

ENDFORM.                                                    "WA01_DRUCK


Code: Select all
*-------------- Druck schließen ---------------------------------------*
FORM close_form.
  CHECK not x_open is initial.
  CALL FUNCTION 'CLOSE_FORM'.
  CLEAR x_open.
ENDFORM.     


Any help I will appreciate it.

Regards
Tokio[/quote]
tgfch
 
Posts: 7
Joined: Tue Apr 03, 2007 7:49 am

Postby tgfch » Thu Apr 12, 2007 3:22 pm

Problem solve!!!
tgfch
 
Posts: 7
Joined: Tue Apr 03, 2007 7:49 am

Re: MB90 Print Good Movements in One page

Postby Yieng » Fri Jun 18, 2010 1:05 am

Hi

I have the same problem like you, wanted to print MB90 for all the PO line items in just one page. Can you pls let me know how you solve the problem? Thanks

Regards
Yieng
Yieng
 
Posts: 1
Joined: Fri Jun 18, 2010 12:54 am

Re: MB90 Print Good Movements in One page

Postby Gothmog » Fri Jun 18, 2010 3:20 am

I doubt the OP is still following this thread after 3 years...
Please read basic rules, and start a new thread for your question.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1943
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 3 guests





This website is not affiliated with, sponsored by, or approved by SAP AG.