sap-commerce-cloudimpex

SAP Hybris Impex - Set product in catalog to unapproved


I'm looking to mark several thousand products in a Hybris catalog to unapproved in the Approval status field. The following Impex file will update the status to approved but I can't figure out what to change to get mark these as unapproved. I've placed the following text between the ;; with no change - unapproved false 0 'unapproved' 'false'.[![Screen snip - SAP Hybris product approval status field][1]][1]

$catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Online'])[unique=true,default=$productCatalog:Online]
$approved=approvalstatus(code)[default='approved']
                
INSERT_UPDATE AviallProduct;code[unique=true];$catalogVersion;$approved
;BUS70M222AT99=M1;;


  [1]: https://i.sstatic.net/rNQ2b.png

Solution

  • You can simply use :

    $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Online'])[unique=true,default=$productCatalog:Online]
    $unapproved=approvalstatus(code)[default='unapproved']
                    
    INSERT_UPDATE AviallProduct;code[unique=true];$catalogVersion;$unapproved
    ;BUS70M222AT99=M1;;
    

    Or :

    $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Online'])[unique=true,default=$productCatalog:Online]
    $approved=approvalstatus(code)[default='approved']
                    
    INSERT_UPDATE AviallProduct;code[unique=true];$catalogVersion;$approved
    ;BUS70M222AT99=M1;;unapproved