SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Adding pictures Material Master data



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ММ
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1636

PostPosted: Sat Sep 13, 2008 7:34 pm    Post subject: Adding pictures Material Master data Reply with quote

Author: Fatih Telli

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 ).

Code:
*&---------------------------------------------------------------------*
*& 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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ММ All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.