Skip to Content
0
Former Member
Jan 13, 2014 at 12:55 PM

MM PO Output for Contact Person (AP)

1566 Views

Hi all,

I am using the following program / form / smartform to output my PO:

- YBAA_FM06P / ENTRY_NEU / YBBR_MMPO

This combination uses the standard function to get information of the receiver of the message ( 5 external send):


CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'

EXPORTING

pi_nast = nast

pi_addr_key = is_addr_key

pi_repid = lf_repid

IMPORTING

pe_returncode = cf_retcode

pe_itcpo = ls_itcpo

pe_device = lf_device

pe_recipient = cs_recipient --> here SAP recover who will receive the message

pe_sender = cs_sender.

Inside this function, another function is used to get the address information about the PO:

CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'

EXPORTING

strategy = pi_nast-tcode

address_number = pi_addr_key-addrnumber --> This number is always filled with the addr number of the vendor

person_number = pi_addr_key-persnumber

IMPORTING

comm_type = lvs_comm_type

comm_values = lvs_comm_values

EXCEPTIONS

address_not_exist = 1

person_not_exist = 2

no_comm_type_found = 3

internal_error = 4

parameter_error = 5

OTHERS = 6.


So my doubt is. Someone know if exists any way of define a Contact Person (Partner Function AP) that is in Vendor Master (Xk01) as persnumber (in blue above) and do a output message to it? I am not getting it and analyzing the program I think may exist a way to do it.


Thanks for your help.


Gian