主页 > 专属服务器 > > 正文

网站服务器_云服务器如何搭建网站_最新活动

来源:胜利云 发布时间:2021-09-26 13:30 标签:网站最新活动搭建如何服务器
浏览:

网站服务器_云服务器如何搭建网站_最新活动

When attachment is added to PR and when we create Purchase Order (PO) based on Purchase Requisition (PR), then all the attachment attached to PR line Item will be copied from PR to PO automatically. But if we are using BAPI to create PO, then attachments won’t get transferred to PO. When I searched for such requirement, I did not get any solution. Hence I have designed and sharing the same which might be useful for few members. Below code will help to transfer the DMS document id (attachments) from PR to PO while using BAPI to create PO . This function need to be called after committing "BAPI_PO_CHANGE" OR  "BAPI_PO_CREATE1" BAPI. PR number will be passed as input to this function module.

FUNCTION zm_copy_att_from_pr_to_po.

*"———————————————————————-

*"*"Local Interface:

*"  IMPORTING

*"     VALUE(I_BANFN) TYPE  BANFN

*"  TABLES

*"      T_RETURN STRUCTURE  BAPIRETURN

*"  EXCEPTIONS

*"      NO_PURCHAING_DATA

*=============================================================================*

*—————————————————————————–*

* Function Module  : ZM_COPY_ATT_FROM_PR_TO_PO                                *

* Author           : Sasikanth SM (XSSM)                                      *

* Date             : 05/15/2015                                               *

* Thread Manager ID:                                                          *

*—————————————————————————–*

* Type of Program  : Function Module                                          *

* Purpose          : This function will copy the DMS document id attached     *

*                    to PR and link the same to PO                            *

* Transport Req    :                                                          *

*—————————————————————————–*

DATA: w_drad          TYPE drad,

i_drad          TYPE TABLE OF drad,

i_dradn         TYPE TABLE OF  drad_n,

w_dradn         TYPE drad_n,

w_eban          TYPE eban,

i_eban          TYPE TABLE OF eban,

w_bapireturn    TYPE bapireturn.

DATA: lv_new_objkey     TYPE drad-objky,

lv_old_objkey     TYPE drad-objky.

CONSTANTS : c_eban      TYPE dokob  VALUE ‘EBAN’,

c_ekpo      TYPE dokob  VALUE ‘EKPO’,

c_x         TYPE c      VALUE ‘X’,

c_i         TYPE c      VALUE ‘I’,

c_e         TYPE c      VALUE ‘E’.

*=============================================================================*

* Get the PR details based on the input passed.

SELECT * FROM eban INTO TABLE i_eban

WHERE banfn = i_banfn.

IF sy-subrc NE 0.

RAISE no_purchaing_data.

ENDIF.

LOOP AT i_eban INTO w_eban.

*   Generate refference object (PR) key

CONCATENATE w_eban-banfn w_eban-bnfpo INTO lv_old_objkey.

*   Generate new object (PO) key

IF w_eban-ebeln  IS NOT INITIAL.

CONCATENATE w_eban-ebeln w_eban-ebelp INTO lv_new_objkey.

ENDIF.

CHECK lv_new_objkey IS NOT INITIAL.

*   Get the Document key’s of PR Line Item

CALL FUNCTION ‘DOKUMENTE_ZU_OBJEKT’

EXPORTING

key           = lv_old_objkey

objekt        = c_eban

TABLES

doktab        = i_drad

EXCEPTIONS

kein_dokument = 1

OTHERS        = 2.

IF sy-subrc NE 0.

CONCATENATE text-001 lv_old_objkey  INTO   w_bapireturn-message.

w_bapireturn-type      = c_i.

APPEND w_bapireturn TO t_return.

CONTINUE.

ENDIF.

*  Populate i_dradn itab from i_drad

LOOP AT i_drad INTO w_drad.

*   Assign PR Item document to PO Item

MOVE-CORRESPONDING w_drad TO w_dradn.

w_dradn-dokob = c_ekpo.

w_dradn-objky = lv_new_objkey.

APPEND w_dradn  TO i_dradn.

ENDLOOP.

CHECK i_dradn[] IS NOT INITIAL.

*   Map the PR document key to PO Line Item

CALL FUNCTION ‘DOKUMENTZUORDNUNGEN_BUCHEN’

IN UPDATE TASK

EXPORTING

ob      = c_ekpo

objky   = lv_new_objkey

TABLES

savdrad = i_dradn.

*  Commit the changes

CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’

EXPORTING

wait = c_x.

REFRESH: i_drad, i_dradn.

CLEAR  : lv_new_objkey, lv_old_objkey, w_drad, w_dradn, w_eban.

ENDLOOP.

*=============================================================================*

ENDFUNCTION.

Is there any configuration for this? please advise.

Thank you.

发表评论
验证码: 点击我更换图片

注:网友评论仅供其表达个人看法,并不代表本站立场。

热门文章

  • 亚马逊云_海报cdn_优惠券
    <strong>亚马逊云_海报cdn_优惠券</strong>

    亚马逊云_海报cdn_优惠券

    消费者在哪里?这不是医疗保健领域的"捉迷藏"游戏,而是建立一个全面运转的医疗保健系统所需要的关键缺失要素。让消费者参与进来——作为一个消费...

  • 云解析_svn服务器安装_限时特惠
    <strong>云解析_svn服务器安装_限时特惠</strong>

    云解析_svn服务器安装_限时特惠

    集成/docker/梅索斯/marathonapachemesos是一个用于调度和管理分布式应用程序的开源集群管理器。Mesos几乎就像整个集群是一个单一的集群一样分配CPU和RAM等资源...

  • 云服务器_阿里云服务器账号_哪家好
    <strong>云服务器_阿里云服务器账号_哪家好</strong>

    云服务器_阿里云服务器账号_哪家好

    技术支持副总裁Aileen Wyer和高级系统管理员Maruf Rahman最近与我们坐下来讨论我们的合作伙伴关系如何帮助CAN Capital的遗留备份基础设施现代化,以简化数据管...

  • 消息队列_折枝by困倚危楼百度云_新注册优
    <strong>消息队列_折枝by困倚危楼百度云_新注册优</strong>

    消息队列_折枝by困倚危楼百度云_新注册优

    今天,两位前行业分析师(现在是Veeam高管)讨论了塑造数据保护行业和IT格局的趋势:Jason Buffington@JBuff,前ESG数据保护首席分析师Dave Russell@BackupDave,Ga...

  • 中间件_服务器能干什么_超低折扣
    <strong>中间件_服务器能干什么_超低折扣</strong>

    中间件_服务器能干什么_超低折扣

    Nathan Sielaff,World Vision的系统工程师,负责备份、存储等。他致力于创建一个灵活和敏捷的IT环境,这样组织就不必担心底层基础设施,可以将精力集中在任...

云储存

更多 >
  • <strong>京东云_最新电影百度云_返利</strong>
    京东云_最新电影百度云_返利

    在之前的第1部分博客中,我描述了不同的过滤属性,这些属性目前可用于 (需要SAP Service Marketplace登录) 中新启动的云KPI目录https://go.support.sap.com/kpicata...

  • 香港带宽_百度云免费会员_评分榜
    香港带宽_百度云免费会员_评分榜

    亲爱的合作伙伴, 我们想邀请您参加即将推出的SAP enablement产品"S/4HANA DB Migration to HANA",请使用右侧的注册按钮立即预订您的座位! 在这里注册6月22日上午...

云储存对象存储_数据库连接类_价格
云储存服务器_好用的服务器_优惠券
云储存对象存储_西部数码虚拟主机_学生机
云储存香港带宽_六盘水网站建设_测评
云储存服务器_H漫画百度云_稳定性好