rootbin

总是很懒,写不来博客,最近发现可以从onenote同步到博客园,虽然格式丑点,勉强算写博客了吧,可能以后都不干abap,权当纪念一下.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

创建parameter id

Posted on 2015-04-28 16:16  rootbin  阅读(1803)  评论(0)    收藏  举报

Custom Parameter-id Creation

By Abhijit Daptary, Capgemini India

Step1: Creation of parameter ID. 

Parameter ID can be created in the table TPARA. Just enter the name of the parameter id in the table and that parameter ID will be created. 

   

Go to the table maintenance generator of the table TPARA and go to the Maintain button through the transaction SM30. 

Enter the table view name TPARA. 

   

Click on the maintain button. The following information will appear. Click on the Tick button or the ENTER button to go to the next screen. 

   

Enter the Set/Get parameter id as the parameter ID you want to create. Here, I will be creating the parameter Id as ZNAME_DATA1. Click on ENTER button. 

   

It will ask for the text of the parameter Id. Enter the text of the parameter ID and click on the Savebutton. 

   

   

Enter the Package and the transport number. 

The parameter id can be seen in the table TPARA

   

Step2: Using the parameter Id that you have created. 

Now go to the SE11 transaction for creating a data element and enter the parameter id at theFurther Characteristics tab at the parameter Id section. 

   

Activate the data element and use it with the program. It will act the same good as a standard one.

   

来自 <http://saptechnical.com/Tutorials/ABAP/ParameterID/custom.htm>

   

   

标准程序的Parameter id 并不一定准确

2014年12月30日

10:36

Exp.

   

Me39

F1 看到的是VRT

   

   

程序中:

根据不同的配置 id可能各不相同

MODULE d0205_get_parameter OUTPUT.

   

  DATAgv_cc_flag TYPE c LENGTH 1.

   

* Belegnummer über Parameter-Id nur holen, wenn noch nicht anderweitig

* vorbelegt ist (z.B. in ME38-Aufruf aus ME57)

  CHECK rm06e-evrtn EQ space.                               "4.0B TK

  CASE t160-bstyp.

    WHEN bstyp-kont.

      GET PARAMETER ID 'CTR' FIELD rm06e-evrtn.

      GET PARAMETER ID 'CCNN' FIELD gv_cc_flag.

      IF gv_cc_flag IS NOT INITIAL.

        GET PARAMETER ID 'CCTR' FIELD rm06e-evrtn.          "CCM EhP4

        CLEAR gv_cc_flag.

        SET PARAMETER ID 'CCNN' FIELD gv_cc_flag.

      ENDIF.

    WHEN bstyp-lfpl.

      GET PARAMETER ID 'SAG' FIELD rm06e-evrtn.

    WHEN space.

      GET PARAMETER ID 'VRT' FIELD rm06e-evrtn.

  ENDCASE.

   

ENDMODULE.                 " D0205_GET_PARAMETER  OUTPUT

   

一个字段可能出现在多个场合

但是定义是不一样的

   

sap的标准程序可能都是用一个字段(同一个dataelemnt)

然后技术信息里面看到的parameter id 并不是程序中实际对应的id

导致跨程序调用传值失败

   



亲爱的P.I.G 你应该是不会到这里来的吧 ? I'm always 怀挺!