Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

DISPLAYING MATERIAL MASTER DATA JPG IMAGES

TCODE: OMT3B  CHOSE ONE SECTION AND  SAPLMGD1 --> ZZ2 THEN CREATE THIS REPORT

YOU SHOUL PLACE  A CUSTOM CONTAINER NAMED : C100 IN YOUR SUBSCREEN (001 ).

 

Error rendering macro 'code': Invalid value specified for parameter 'lang'
*&---------------------------------------------------------------------*
*& Report  ZZ2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT  ZZ2.
TABLES: MARA, MAKT, T130M  .
DATA : CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
DATA : DOCUMENT TYPE REF TO  CL_DD_DOCUMENT.
DATA : RENK(10) TYPE C .
PARAMETERS: P_MATNR LIKE MARA-MATNR.
START-OF-SELECTION.
  SELECT SINGLE * FROM MARA WHERE MATNR = P_MATNR.
  CALL SCREEN 001.
*&---------------------------------------------------------------------*
*&      Module  STATUS_0001  OUTPUT
*&---------------------------------------------------------------------*
MODULE STATUS_0001 OUTPUT.
  DATA V_ID    TYPE SDYDO_KEY.
  DATA V_MAKTX TYPE SDYDO_TEXT_ELEMENT.
  DATA V_WIDTH TYPE STRING  VALUE '450'.
  CREATE OBJECT CONTAINER
    EXPORTING
      CONTAINER_NAME = 'C100'.
  CREATE OBJECT DOCUMENT.
  V_ID = MARA-MATNR.
  V_MAKTX = MAKT-MAKTX.
  CALL METHOD DOCUMENT->ADD_TEXT
    EXPORTING
      TEXT = V_MAKTX.
  CALL METHOD DOCUMENT->ADD_PICTURE
    EXPORTING
      PICTURE_ID = V_ID
      WIDTH      = V_WIDTH.
  CALL METHOD DOCUMENT->DISPLAY_DOCUMENT
    EXPORTING
      PARENT = CONTAINER.
  IF T130M-AKTYP = 'A' .
    LOOP AT SCREEN .
      IF SCREEN-NAME = 'MARA-RENK' .
        SCREEN-INPUT  = 0 .
        MODIFY SCREEN .
      ENDIF .
    ENDLOOP .
  ENDIF .
ENDMODULE.                 " STATUS_0001  OUTPUT
*&---------------------------------------------------------------------*
*&      Module  exit  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE EXIT INPUT.
  LEAVE TO SCREEN 0.
ENDMODULE.                 " exit  INPUT
*&---------------------------------------------------------------------*
*&      Module  f4_renk  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE F4_RENK INPUT.
  PERFORM RENK_GET_VALUES USING 'MARA-RENK'.
ENDMODULE.                 " f4_renk  INPUT
*&---------------------------------------------------------------------*
*&      Form  RENK_GET_VALUES
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_0085   text
*----------------------------------------------------------------------*
FORM RENK_GET_VALUES  USING    P_RENK .
ENDFORM.                    " RENK_GET_VALUES
*&---------------------------------------------------------------------*
*&      Form  RENK_GET_F4HELP
*&---------------------------------------------------------------------*
FORM RENK_GET_F4HELP  USING    P_DYNPFIELDS_FIELDINP
                               P_DYNPFIELDS_FIELDVAL
                      CHANGING P_RENK_VAL .
ENDFORM.                    " RENK_GET_F4HELP
*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0001  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0001 INPUT.
*ptab
*RMMG1
  CALL FUNCTION 'MARA_SET_SUB'
    EXPORTING
      WMARA = MARA.
ENDMODULE.                 " USER_COMMAND_0001  INPUT
  • No labels

3 Comments

  1. Hi,

    i don´t get this part "TCODE: OMT3B  CHOSE ONE SECTION AND  SAPLMGD1 --> ZZ2 THEN CREATE THIS REPORT"

    could you please give some additional details about this?

    Best regards. 

  2. Former Member

    this program makes two bmp formated pictures in SAP Se78 and OAER ,

    means bmp picture will be stored as object and standard graphic attributes at the same time.

  3. Former Member

    TCODE: OMT3B  CHOSE ONE SECTION AND  SAPLMGD1 -->

    omt3b : material master customizing transaction, you can set up screen fields for mm material master data : MM01, MM02

    saplmgd1 : prog name default setting, you have to replace your abap program name for example : zz2 ,

     you first should enter omt3b transaction then choose one of column tabs , then you will see SAPLMGD1 and screen numbers,

    now you will replace one of them to SAPLMGD1 -> ZZ2  and Screen number 9001-> 100 ,after then when you enter mm01 or mm02 you will see your csutom screen in defined placement (before you had choosed omt3b tab)