text BAPI:SCARICO COSTI SU PROGETTO

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text BAPI:SCARICO COSTI SU PROGETTO相关的知识,希望对你有一定的参考价值。

      SELECT SINGLE pspid
        FROM proj
        INTO lv_projdef
        WHERE pspnr EQ ls_pspnr-low.

GET DATA A PARTIRE DA UN PROGETTO 

        CALL FUNCTION 'BAPI_PROJECT_GETINFO'
          EXPORTING
            project_definition     = lv_projdef
            with_milestones        = 'X'
          IMPORTING
            e_project_definition   = ls_projdef
            return                 = ls_return
          TABLES
            i_wbs_element_table    = lt_iwbs_element
            e_wbs_element_table    = lt_ewbs_element
            e_wbs_milestone_table  = lt_ewbs_milestone
            e_wbs_hierarchie_table = lt_ewbs_hierarchie
            e_activity_table       = lt_activity
            e_message_table        = lt_message.
            
  ****************************************************************************
  
  BATCH INPUT CJ12 - PER IMPOSTARE SCARICO COSTI SU WBS 
  
      PERFORM bdc_dynpro      USING 'SAPLCJWB' '0100'.

    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  '*PRPS-POSID'.

    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=METB'.

    PERFORM bdc_field       USING '*PRPS-POSID'
                                  is_prps-posid. "'rg18-001.lab'.

    PERFORM bdc_dynpro      USING 'SAPLCJWB' '1999'.

    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'PRPS-POSID'.

    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ABRV'.

    PERFORM bdc_field       USING 'PRPS-POSID'
                                  is_prps-posid. "'RG18-001.LAB'.

    PERFORM bdc_field       USING 'PRPS-POST1'
                                  is_prps-post1. "'Ferrigno: Progettazione'.

    PERFORM bdc_field       USING 'PRTE-PEINH'
                                  'G.'.

    PERFORM bdc_field       USING 'PRTE-EEINH'
                                  'G.'.

    PERFORM bdc_field       USING 'PRTE-IEINH'
                                  'G.'.

    PERFORM bdc_field       USING 'PRPS-SLWID'
                                  '0000001'.

    PERFORM bdc_field       USING 'PRPS-USR10'
                                  'X'.

    PERFORM bdc_field       USING 'PRPS-PRART'
                                  'ZB'.

    PERFORM bdc_field       USING 'PRPS-POSKI'
                                  is_prps-poski.  "'RG18-001.LAB'.

    PERFORM bdc_field       USING 'PRPS-VERNR'
                                  is_prps-vernr. "'23100001'.

    PERFORM bdc_field       USING 'PRPS-PLAKZ'
                                  'X'.

    PERFORM bdc_field       USING 'PRPS-BELKZ'
                                  'X'.

    PERFORM bdc_dynpro      USING 'SAPLKOBS' '0130'.

    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'COBRB-KONTY(01)'.

    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.

    PERFORM bdc_field       USING 'COBRB-KONTY(01)'
                                  'WBS'.

    PERFORM bdc_field       USING 'DKOBR-EMPGE(01)'
                                  is_ewbs_hierarchie-up. "'RG18-001'.

    PERFORM bdc_dynpro      USING 'SAPLKOBS' '0130'.

    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'COBRB-KONTY(01)'.

    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=BACK'.

    PERFORM bdc_dynpro      USING 'SAPLCJWB' '1999'.

    PERFORM bdc_field       USING 'BDC_CURSOR'

                                  'PRPS-POSID'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=BU'.

    PERFORM bdc_field       USING 'PRPS-POSID'
                                  is_prps-posid. "'RG18-001.LAB'.

    PERFORM bdc_field       USING 'PRPS-POST1'
                                  is_prps-post1. "'Ferrigno: Progettazione'.

    PERFORM bdc_field       USING 'PRTE-PEINH'
                                  'G.'.

    PERFORM bdc_field       USING 'PRTE-EEINH'
                                  'G.'.

    PERFORM bdc_field       USING 'PRTE-IEINH'
                                  'G.'.

    PERFORM bdc_field       USING 'PRPS-SLWID'
                                  '0000001'.

    PERFORM bdc_field       USING 'PRPS-USR10'
                                  'X'.

    PERFORM bdc_field       USING 'PRPS-PRART'
                                  'ZB'.

    PERFORM bdc_field       USING 'PRPS-POSKI'
                                  is_prps-poski. "'RG18-001.LAB'.

    PERFORM bdc_field       USING 'PRPS-VERNR'
                                  is_prps-vernr. "'23100001'.

    PERFORM bdc_field       USING 'PRPS-PLAKZ'
                                  'X'.

    PERFORM bdc_field       USING 'PRPS-BELKZ'
                                  'X'.

    CALL TRANSACTION 'CJ12' USING gt_bdcdata
*                         MODE 'N'.
                     MODE 'A'.
**************************************************************************

以上是关于text BAPI:SCARICO COSTI SU PROGETTO的主要内容,如果未能解决你的问题,请参考以下文章

text 博客con BAPI FM ed esempi

text BAPI creazione IDOC ALE_IDOCS_CREATE

20160621-BAPI 更改外向DN&更改拣配

几个ABAP FREE面试问题

如何利用BAPI SD_SALESDOCUMENT_CHANGE修改Sales Order的字段

预留相关BAPI;过账BAPI